Environment variables
.env is loaded at bootstrap, falling back to .env.example for keys it doesn’t define. These settings belong to the installation, not the business.
Application
Database
Frontend and assets
Sessions, logs and tooling
Read them with the global helper, which takes a default:
Config values
Computed at bootstrap and injected by ID:
Two more IDs are set alongside them:
version, read from the VERSION file, and license.
Options
Options are rows of JSON, edited by administrators. They’re loaded once per request and exposed as dot paths:option:
Common option groups
Writing options
DeleteOptionCommand removes a key, including a nested one.
Administrator-facing forms post to the options API rather than calling this directly. See Admin settings pages.
Which layer to use
Options require a database, so anything needed before the database exists, such as the debug flag, has to be an environment variable.