Configuration

Comprehensive guide to configuring LaraDashboard including environment variables, application settings, and system customization options.

Configuration

LaraDashboard follows Laravel's configuration conventions with an additional database-backed settings layer for runtime customization.

Environment Variables (.env)

# Application
APP_NAME="LaraDashboard"
APP_ENV=local          # local | staging | production
APP_DEBUG=true         # false in production
APP_URL=http://localhost:8000
APP_TIMEZONE=UTC
APP_LOCALE=en

# Database
DB_CONNECTION=mysql
DB_HOST=127.0.0.1
DB_PORT=3306
DB_DATABASE=laradashboard
DB_USERNAME=root
DB_PASSWORD=

# Cache / Session / Queue  (use redis in production)
CACHE_DRIVER=file      # file | redis | database
SESSION_DRIVER=file    # file | redis | database
QUEUE_CONNECTION=sync  # sync | redis | database

# Redis (if used)
REDIS_HOST=127.0.0.1
REDIS_PASSWORD=null
REDIS_PORT=6379

# Mail
MAIL_MAILER=smtp
MAIL_HOST=mailpit
MAIL_PORT=1025
MAIL_FROM_ADDRESS="hello@example.com"
MAIL_FROM_NAME="${APP_NAME}"

# AI Integration (optional)
OPENAI_API_KEY=sk-...
ANTHROPIC_API_KEY=sk-ant-...
AI_DEFAULT_PROVIDER=openai   # openai | claude

# Storage
FILESYSTEM_DISK=public  # local | public | s3
AWS_ACCESS_KEY_ID=
AWS_SECRET_ACCESS_KEY=
AWS_DEFAULT_REGION=us-east-1
AWS_BUCKET=

Environment presets

Setting Local Staging Production
APP_DEBUG true true false
LOG_LEVEL debug debug error
CACHE_DRIVER file redis redis
SESSION_DRIVER file redis redis
QUEUE_CONNECTION sync redis redis

LaraDashboard Config (config/laradashboard.php)

Key Default Description
marketplace_url https://laradashboard.com Module marketplace base URL
update_check_interval 1440 Minutes between update checks
demo_mode false Prevent destructive actions when true

Admin Panel Settings

These are stored in the database and editable via Settings in the admin panel.

Setting Default Description
site_name LaraDashboard Application display name
site_description Meta description
site_logo / site_favicon Branding images
admin_email Administrator contact
theme_primary_color #6366f1 Primary brand color
sidebar_mode / navbar_mode dark / light UI chrome theme
enable_registration true Allow public sign-up
require_email_verification true Enforce email verification
enable_recaptcha false reCAPTCHA on auth forms
mail_from_name / mail_from_address Default email sender
google_analytics_id GA4 Measurement ID
google_tag_manager_id GTM Container ID
custom_head_scripts / custom_body_scripts Injected script tags

Reading settings in code

// PHP
$name = setting('site_name', 'Default');
// or
$name = app(SettingService::class)->get('site_name', 'Default');
{{-- Blade --}}
<title>{{ setting('site_name') }}</title>

Cache Commands

# Clear everything (use after config changes)
php artisan optimize:clear

# Production — cache for performance
php artisan optimize

Security Essentials

APP_URL=https://yourdomain.com   # HTTPS in production
SESSION_SECURE_COOKIE=true
SESSION_LIFETIME=120
APP_DEBUG=false

Next Steps

/