Laravel 4 Migration Bug?

Neo Ighodaro

You know how Laravel allows for environment based configurations? Where config files in "app/config/local" override those in "app/config". All my config files in the "local" directory override as expected, except the config file: "database.php"

I want to be able to specify different database connections for local and production environment. But when I do, and run "artisan migrate --env=local" it still attempts to use the configuration in the production folder, not the "local" folder.

Keith Mifsud

This sometimes get a bit confusing on local environements. I normally use the hostname in bootstrap/start.php as opposed to the IP.

For example my Virtual Box Localhost's hostname is "debian"... just type hostname in your terminal to get the hostname.

This should work. However, since you're using environment config folders (which I always do) then I would remove the settings in the app/congig/* as you should never need them since your other servers will have their own settings in app/config/yourenv

Hope this helps

Collected from the Internet

Please contact [email protected] to delete if infringement.

edited at
0

Comments

0 comments
Login to comment

Related