In Laravel 4, I set up my local development machine (my laptop) and then I have my production server.
In my /bootstrap/start.php
$env = $app->detectEnvironment(array(
'local' => array('MacBook-Pro-2.local'),
'production' => array('ripken'),
));
Then I created .env.local.php in my root directory as follows:
<?php
return [
'db_host' => '127.0.0.1',
'db_name' => 'censored',
'db_user' => 'censored',
'db_password' => 'censored'
];
This part works. However, I went to my production server and created the exact same file called .env.production.php , and it does not load the variables from this file. I don’t know what made me think, but I renamed this .env.php file without “production” in the name and it works.
: .env.production.php ? , Laravel , .