Support the ongoing development of Laravel.io →
Configuration

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.

Last updated 2 years ago.
0

Still no reply/idea, whats up guys :)

Last updated 2 years ago.
0

Sign in to participate in this thread!

Eventy

Your banner here too?

stefanX201 stefanx201 Joined 23 May 2014

Moderators

We'd like to thank these amazing companies for supporting us

Your logo here?

Laravel.io

The Laravel portal for problem solving, knowledge sharing and community building.

© 2025 Laravel.io - All rights reserved.