Wecode uses environment variables to configure application settings. All environment variables are defined in the .env file in the root directory.
Initial Setup
Copy the example environment file to create your configuration:
After copying, generate an application key:
Application Settings
APP_NAME
The name of your application, used in notifications and UI elements.
Default: Laravel
APP_ENV
The application environment. Determines how services are configured.
Options:
local - Development environment
staging - Staging environment
production - Production environment
Default: production
APP_DEBUG
Enables detailed error messages with stack traces.
Never enable debug mode in production. This exposes sensitive information about your application structure and configuration.
Options:
true - Show detailed error messages
false - Show generic error pages
Default: false
APP_KEY
Encryption key used by Laravel’s encryption services. Must be a random 32-character string.
The APP_KEY is critical for security. Generate it using php artisan key:generate and never share it publicly.
APP_URL
The base URL of your application. Used for generating URLs in emails and commands.
Example: https://wecode.example.com
APP_ARCHIVED
Indicates whether the application is in archived mode.
Options:
true - Application is archived
false - Application is active
Default: false
Database Configuration
DB_CONNECTION
The database driver to use.
Supported drivers:
mysql - MySQL/MariaDB
pgsql - PostgreSQL
sqlite - SQLite
sqlsrv - SQL Server
Default: mysql
DB_HOST
The database server hostname or IP address.
Default: 127.0.0.1
DB_PORT
The database server port.
Default ports:
- MySQL:
3306
- PostgreSQL:
5432
- SQL Server:
1433
DB_DATABASE
The name of the database to connect to.
Default: wecode
DB_USERNAME
The database username.
Default: homestead
DB_PASSWORD
The database password.
Use a strong password for production databases and never commit your .env file to version control.
Default: secret
Mail Configuration
MAILER_DSN
The mail server connection string using DSN format.
Format: smtp://username:password@host:port
Note: URL-encode special characters in the username and password (e.g., @ becomes %40).
Example configurations:
Cache Settings
CACHE_DRIVER
The cache storage driver.
Supported drivers:
file - File-based cache
database - Database cache
redis - Redis cache
memcached - Memcached cache
apc - APC cache
array - Array cache (testing only)
Default: file
Session Settings
SESSION_DRIVER
The session storage driver.
Supported drivers:
file - File-based sessions
cookie - Cookie-based sessions
database - Database sessions
redis - Redis sessions
memcached - Memcached sessions
array - Array sessions (testing only)
Default: file
SESSION_LIFETIME
Session lifetime in minutes.
Default: 120 (2 hours)
Queue Configuration
QUEUE_CONNECTION
The queue driver for background jobs.
Supported drivers:
sync - Synchronous (no queue)
database - Database queue
redis - Redis queue
sqs - Amazon SQS
Default: sync
Redis Configuration
REDIS_HOST
Redis server hostname.
Default: 127.0.0.1
REDIS_PASSWORD
Redis server password (if required).
Default: null
REDIS_PORT
Redis server port.
Default: 6379
Logging
LOG_CHANNEL
The logging channel to use.
Default: stack
Broadcasting
BROADCAST_DRIVER
The broadcast driver for real-time events.
Supported drivers:
log - Log broadcasts (development)
pusher - Pusher service
redis - Redis broadcasting
null - Disable broadcasting
Default: log
AWS Configuration
Optional settings for AWS services (S3, SES, etc.).
AWS_ACCESS_KEY_ID=
AWS_SECRET_ACCESS_KEY=
AWS_DEFAULT_REGION=us-east-1
AWS_BUCKET=
Pusher Configuration
Optional settings for Pusher real-time broadcasting.
PUSHER_APP_ID=
PUSHER_APP_KEY=
PUSHER_APP_SECRET=
PUSHER_APP_CLUSTER=mt1
Production Checklist
Before deploying to production, verify these settings: