I set several ENV variables with Laravel Forge which are correctly picked up by the application. However artisan doesn't seem to pick up my environment. php artisan env
returns:
Current application environment: local
In the nginx configuration I also have
fastcgi_param ENV "test";
This is how I detect my environment:
$env = $app->detectEnvironment(function () {
return getenv('ENV') ?: 'local';
});
How can I have artisan think its in the test environment?