.env file in the project root. Laravel ships with a .env.example template that you copy and populate before your first run.
Initial setup
Generate an application key
APP_KEY. Laravel uses it to encrypt sessions, cookies, and other payloads. The app will not boot without it.Edit the file
Open
.env in your editor and fill in the values for your environment. The sections below describe every variable.App settings
Human-readable application name. Referenced in mail subjects and the frontend via
VITE_APP_NAME. Set this to "ElCoco DMI" or your preferred display name.Current environment. Accepted values:
local, staging, production. Controls error verbosity and certain framework behaviours.Encryption key generated by
php artisan key:generate. Must be a base64:-prefixed 32-byte string. Required — the app will not start without this.When
true, Laravel renders detailed exception pages. Set to false in production to prevent leaking stack traces.The canonical URL of the application. Used when generating absolute URLs (e.g. PDF storage links, mail links). Must include the scheme (
http:// or https://).Default locale for translations and date formatting.
Locale used when a translation key is missing in
APP_LOCALE.Locale used by Faker when generating fake data in factories and seeders.
Storage driver for maintenance-mode state.
file writes a flag to disk; database stores it in the cache table. Uncomment APP_MAINTENANCE_STORE if you switch to database.Cost factor for bcrypt password hashing. Higher values are slower to compute, which is more secure but increases CPU usage on login. 12 is a reasonable production value.
Logging
Primary log channel.
stack aggregates multiple channels defined in config/logging.php.Channels included in the
stack channel. Comma-separate multiple values (e.g. single,slack).Channel that receives PHP and Laravel deprecation notices. Set to
null to silence them.Minimum severity to write. Values follow RFC 5424:
debug, info, notice, warning, error, critical, alert, emergency. Use error in production.Database
ElCoco defaults to SQLite for local development. Switch to MySQL for staging and production.- SQLite (default)
- MySQL
database/database.sqlite automatically on first migration.Database driver. Supported:
sqlite, mysql, mariadb, pgsql, sqlsrv.Database server hostname or IP address. Not required for SQLite.
Database port. Default is 3306 for MySQL/MariaDB.
Name of the database to connect to.
Database user. Not required for SQLite.
Database password. Not required for SQLite.
Cache and session
Cache backend. ElCoco defaults to
database, which stores cached values in the cache table. Other options: file, redis, memcached, array.Optional prefix applied to all cache keys. Useful when multiple apps share one Redis or Memcached instance.
Session backend.
database persists sessions in the sessions table. Other options: file, cookie, redis, array.Minutes before an idle session expires.
When
true, session data is encrypted at rest using APP_KEY.Cookie path scope.
/ makes the session cookie available site-wide.Cookie domain.
null defaults to the current hostname. Set to .yourdomain.com to share a session across subdomains.Queue
Queue driver. ElCoco defaults to
database (jobs are stored in the jobs table). Other options: sync (process inline, no worker needed), redis, sqs.Real-time broadcast driver.
log writes events to the log file instead of broadcasting. Change to pusher or reverb if you add WebSocket features.QuoteReplyMail. See Email configuration for the full mail flow.
Mail transport to use.
log writes emails to the Laravel log (useful for local dev). Set to smtp for real delivery.TLS scheme for SMTP. Accepted values:
tls, ssl, or leave blank. When using port 465, set this to ssl.SMTP server hostname (e.g.
smtp.mailgun.org, smtp.gmail.com).SMTP port. Common values:
587 (STARTTLS), 465 (SSL), 25 (unencrypted).SMTP authentication username.
SMTP authentication password.
The
From: address on all outgoing mail. Required for production — use a verified sender address.The
From: display name. Defaults to the value of APP_NAME.Filesystem
Default storage disk. ElCoco also uses the
public disk explicitly (via Storage::disk('public')) to store generated PDFs at storage/app/public/quotes/.AWS access key ID. Required only if you switch the
public disk to S3.AWS secret access key.
AWS region for S3 and other services.
S3 bucket name for file storage.
Enable path-style S3 endpoint. Required for S3-compatible services like MinIO.
Redis and Memcached
These variables are only needed if you switch the cache, session, or queue driver toredis or memcached.
PHP Redis extension to use.
phpredis requires the ext-redis PHP extension; predis uses the pure-PHP predis/predis package.Redis server hostname.
Redis authentication password.
null disables authentication.Redis server port.
Memcached server hostname.
Sanctum
Laravel Sanctum provides API token authentication for the/api/v1/* protected endpoints.
ElCoco’s SPA uses Sanctum’s cookie-based session authentication (via
GET /sanctum/csrf-cookie), so API tokens are only needed for external integrations.Exposes the application name to the Vite frontend build. Interpolated from
APP_NAME at build time.