Hi all :)
Using Homestead with
variables:
- key: APP_ENV
value: local
and
$env = $app->detectEnvironment(function() {
return getenv('APP_ENV') ?: 'local';
});
but
php artisan env
[InvalidArgumentException]
Command "env" is not defined.
Route::get('/', function()
{
dd(getenv('APP_ENV')); // prints string(5) "local"
}
Any ideas?
Attention when you change die APP_ENV in your homestead.yml. It just append dont replace the value in your
/etc/php5/fpm/php-fpm.conf
and use/set the first one.
Sign in to participate in this thread!
The Laravel portal for problem solving, knowledge sharing and community building.
The community