APP_ENV=dev laravel code example
Example 1: laravel APP_ENV config
if (\Illuminate\Support\Facades\App::environment('production')) {
// The environment is production
}
Example 2: laravel set config
config()->set('config.path', $value);
if (\Illuminate\Support\Facades\App::environment('production')) {
// The environment is production
}
config()->set('config.path', $value);