Add .env support to Laravel 4
It's very easy to port Laravel 5's way of handling environment files to Laravel 4.
You've got to require this package (it's that one that L5 uses): [code]composer require vlucas/phpdotenv```
And then you should update bootstrap/start.php
:
...
$dotEnv = new Dotenv\Dotenv(__DIR__ . '/../');
$dotEnv->load();
$env = $app->detectEnvironment(function () {
return getenv('APP_ENV') ?: 'production';
});
...
And boom, done! Now you can use an .env
-file instead of .env.php
.