This is the env variable in my config/app.php
'env' => env('APP_ENV', 'production'),
I changed the APP_ENV variable to staging from .env like the following:
APP_ENV=staging
I run php artisan config:clear.
After that, php artisan env returned:
Current application environment: staging
However, the App::environment() still returns local.
Route::get('/', function () {
dd(App::environment());
});
Any ideas? Did I miss something?