setting env variables in config files laravel code example
Example 1: laravel APP_ENV config
if (\Illuminate\Support\Facades\App::environment('production')) {
// The environment is production
}
Example 2: laravel check environment hlper
if (App::environment('local')) {
// The environment is local
}
if (App::environment(['local', 'staging'])) {
// The environment is either local OR staging...
}