Skip to content

Setting values at runtime ​

Besides static files, you can write values at runtime with config():

php
config('IMG_PATH','/static/img');

When to use it ​

Use dynamic config when a value should change per request, environment, or temporary business rule—paths, feature flags, or module-level tweaks.

Guidance ​

Prefer config files for stable, long-lived settings. Use dynamic updates for runtime state, not as a substitute for clear baseline configuration.

PhpTide documentation