Cmd/Ctrl + K

Configuration

Annabel configuration lives in config/*.php. Each file returns an array and may read environment values through env().

Environment file

Copy the example environment file when creating an application:

Do not commit .env. Keep deploy-specific values in the deployment environment.

Configuration files

The skeleton ships with these application config files:

FilePurpose
config/app.phpProviders, discovery, routes, and autoconfiguration.
config/assets.phpVite and asset configuration.
config/auth.phpAuth providers, credentials, abilities, and policies.
config/cache.phpDefault cache store and store definitions.
config/database.phpDatabase connections and migration paths.
config/filesystem.phpFilesystem disks.
config/http-client.phpHTTP client defaults.
config/logging.phpLog channels.
config/mail.phpMailers and transports.
config/queue.phpQueue connections, retries, backoff, and timeout.
config/security.phpCSRF, throttling, trusted proxies, and presets.
config/session.phpSession storage, cookies, encryption, and Redis.
config/validation.phpSensitive fields excluded from flashed old input.

Reading config

Read configuration values by dot-separated key, with an optional default for missing values.

Dot notation reads nested values.

Writing config at runtime

Use runtime writes for values that should change only in the current process.

Runtime writes affect the current process only. Prefer config files for stable application configuration.

Configuration cache

Build the config cache during deployment:

Clear it when environment or config files change:

php vendor/bin/annabel optimize builds all production caches.

Provider discovery

config/app.php controls framework defaults, application providers, package provider discovery, attribute route discovery, and service autoconfiguration.

Use disabled for explicit opt-outs from default providers. Use extra or bootstrap/providers/*.php for application providers.

Inspecting configuration

The CLI can print resolved configuration while protecting sensitive values.

config:list redacts sensitive values before printing them.