I am trying to set up multiple environments on a Laravel 4 app, and naturally different Databases depending on which environment we are on.
For my local machine, I set up a virtual host for “local.elders.dev”
Unfortunately, for some reason the following code is not working.
$env = $app->detectEnvironment(array(
'local' => array('http://local.elders.dev'),
));
Maybe I need to run an artisan command or something else. I feel I am close, but not quite there yet !
Thanks to all !
OK ! I just solved the issue… The code was actually working ok ! The problem is that I was using
Of course this was not set on my local environment, which pretty much broke the app…
I fixed by simply doing :
Thanks to @jeroen and @theshiftexchange 🙂