Configure your application
Override defaults, read effective values, and manage compiled configuration.
On this page
Override a configuration file
Framework defaults live in the package's config/ directory. Put application overrides in user/config/ rather than editing package files. Each PHP file returns an array; its filename is the configuration namespace.
For example, user/config/app.php:
<?php
return [
'name' => 'Field Notes',
'env' => 'production',
'debug' => false,
'timezone' => 'Europe/Warsaw',
];
The configuration repository merges application overrides over package defaults. Tenant configuration can supply another layer when tenancy is enabled.
Read effective values
Use dot notation to read a value:
$name = config('app.name', 'My application');
$debug = config('app.debug', false);
Inspect the same keys from the command line:
php loom config:get app.name
php loom config:get app.env
php loom config:get app.debug
Supply environment variables
Configuration files can call env() to read process environment values. This does not, by itself, load a .env file. Check the application's bootstrap and deployment environment instead of assuming a dotenv loader exists.
Keep environment-specific credentials outside committed defaults. The web server and CLI may have different process environments; verify both when debugging a discrepancy.
Manage compiled configuration
php loom config:cache
php loom config:clear
Compiled configuration captures resolved values. Clear or rebuild it after changing configuration or environment values. Tenant-aware deployments should verify the active context before compiling configuration.
See the configuration repository for merge and lookup behavior.