# Configuration
Estimated time: 8 minutes
Difficulty: Intermediate
This guide explains all key configuration points in LaraCoreKit, including app settings, module configuration, multilingual setup, and environment-specific options.
Environment File (.env)
Your .env file controls runtime behavior for local, staging, and production environments.
Core Application Settings
APP_NAME="LaraCoreKit"
APP_ENV=local
APP_KEY=base64:your-generated-key
APP_DEBUG=true
APP_URL=http://localhost:8000
Localization
APP_LOCALE=en
APP_FALLBACK_LOCALE=en
APP_FAKER_LOCALE=en_US
Database
DB_CONNECTION=mysql
DB_HOST=127.0.0.1
DB_PORT=3306
DB_DATABASE=laracorekit
DB_USERNAME=root
DB_PASSWORD=
Cache & Sessions
CACHE_DRIVER=file
SESSION_DRIVER=file
QUEUE_CONNECTION=sync
MAIL_MAILER=smtp
MAIL_HOST=mailpit
MAIL_PORT=1025
MAIL_USERNAME=null
MAIL_PASSWORD=null
MAIL_ENCRYPTION=null
MAIL_FROM_ADDRESS="[email protected]"
MAIL_FROM_NAME="${APP_NAME}"
Modules Configuration (config/modules.php)
This is one of the most important files in LaraCoreKit.
Example
return [
'namespace' => 'Modules',
'paths' => [
'modules' => base_path('modules'),
],
'enabled' => [
'Core',
'Auth',
'User',
'Blog',
'Media',
'Settings',
],
'scan' => [
'enabled' => true,
'paths' => [
base_path('modules'),
],
],
];
Enable/Disable a Module
Disable module temporarily:
'enabled' => [
'Core',
'Auth',
'User',
// 'Blog', // disabled
'Media',
'Settings',
],
Then clear cache:
php artisan optimize:clear
Application Config (config/app.php)
Common customizations:
- Application name
- Timezone
- Locale defaults
- Service providers
- Aliases
Recommended
'name' => env('APP_NAME', 'LaraCoreKit'),
'timezone' => 'UTC',
'locale' => env('APP_LOCALE', 'en'),
'fallback_locale' => env('APP_FALLBACK_LOCALE', 'en'),
Authentication Config (config/auth.php)
LaraCoreKit uses Laravel auth + Sanctum.
Key sections:
guards(web, api)providers(users)passwords(reset options)
If using custom user model in a module, update provider model accordingly.
Permissions Config (config/permission.php)
Powered by Spatie Permission.
Configure:
- Role model / permission model
- Teams support
- Cache store and expiration
- Table names
After permission changes, clear permission cache:
php artisan permission:cache-reset
Filesystem Config (config/filesystems.php)
Use local or cloud storage.
Local Disk
'public' => [
'driver' => 'local',
'root' => storage_path('app/public'),
'url' => env('APP_URL').'/storage',
'visibility' => 'public',
],
S3 Disk
FILESYSTEM_DISK=s3
AWS_ACCESS_KEY_ID=your_key
AWS_SECRET_ACCESS_KEY=your_secret
AWS_DEFAULT_REGION=us-east-1
AWS_BUCKET=your_bucket
AWS_URL=
Create storage symlink for local:
php artisan storage:link
Cache & Queue Config
Local Development
CACHE_DRIVER=file
QUEUE_CONNECTION=sync
SESSION_DRIVER=file
Production Recommended
CACHE_DRIVER=redis
QUEUE_CONNECTION=redis
SESSION_DRIVER=redis
Run queue worker:
php artisan queue:work
Mail Configuration
Development (Mailpit)
MAIL_MAILER=smtp
MAIL_HOST=127.0.0.1
MAIL_PORT=1025
MAIL_USERNAME=null
MAIL_PASSWORD=null
MAIL_ENCRYPTION=null
Production (SMTP)
MAIL_MAILER=smtp
MAIL_HOST=smtp.mailgun.org
MAIL_PORT=587
[email protected]
MAIL_PASSWORD=your_password
MAIL_ENCRYPTION=tls
Multilingual Config
Supported locales are usually managed by Core/Settings modules.
Typical setup:
// config/app.php
'locale' => 'en',
'fallback_locale' => 'en',
And language files in:
lang/en.jsonlang/hi.jsonlang/ar.json
For RTL logic:
<html lang="{{ app()->getLocale() }}" dir="{{ app()->getLocale() === 'ar' ? 'rtl' : 'ltr' }}">
Frontend Build Config
Vite (vite.config.js)
Make sure module assets/views are included when needed.
Typical inputs:
input: ['resources/css/app.css', 'resources/js/app.js']
Tailwind (tailwind.config.js)
Include module blade paths:
content: [
'./resources/**/*.blade.php',
'./modules/**/resources/**/*.blade.php',
'./vendor/filament/**/*.blade.php',
]
Config Cache Commands
Use these commands during configuration updates:
php artisan config:clear
php artisan cache:clear
php artisan route:clear
php artisan view:clear
php artisan optimize:clear
Production optimize:
php artisan config:cache
php artisan route:cache
php artisan view:cache
php artisan optimize
Environment Profiles
Local
APP_DEBUG=true- File cache/session
- Sync queue
- Detailed logs
Staging
APP_DEBUG=false- Real services where possible
- Redis queue/cache
- Lower log verbosity
Production
APP_DEBUG=false- Redis for cache/session/queue
- SMTP configured
- Monitoring enabled
- Config and route cache enabled
Common Configuration Mistakes
- Forgetting to run
php artisan optimize:clearafter config changes. - Missing module path in
config/modules.php. - Not including module blade files in Tailwind content paths.
- Wrong
APP_URLcausing broken asset URLs. - Wrong filesystem disk causing upload failures.
Next Steps
Next: Core Architecture →
Then: Module System →