You need to have access to the $app object in routes. Try following:
Route::get('env', function() {
global $app;
$environment = $app->environment();
return $environment;
});
Sign in to participate in this thread!
The Laravel portal for problem solving, knowledge sharing and community building.
The community