I am using laravel for a project and trying to run some commands from Laravel. However, it is unable to detect the environment which is in and run the command on the correct environment
My environment structure is as below
app
-config
-production
-staging
database.php
and the way i grab the value of my environment is as below
$env = $app->detectEnvironment(function()
{
// Default to local if LARAVEL_ENV is not set
return getenv('LARAVEL_ENV') ?: 'development';
});