laravel APP_ENV config
snippet in php

laravel APP_ENV config

user7370

if (\Illuminate\Support\Facades\App::environment('production')) {
    // The environment is production
}

laravel get env variable

user9184

dd(env('APP_NAME'));