How to setup Local and Production environments on Laravel

One great feature of Laravel is how easy it is to setup local and dev environments.

Why would you want separate environments?

  • Require separate packages for dev, and production.
  • Less bloat / potential for errors on production.
  • Turn off debug on production.
  • Special config options for local vs production.
  • etc…

Next we simply create a new folder at : App/config/local/

If you create a App.php file -this file will override the global App.php in the parent directory while working in the local environment. So you can add different providers/facades to this local version and not mess up the production version.

It's only fair to share...
Share on Facebook0Share on Google+0Tweet about this on TwitterShare on LinkedIn0Pin on Pinterest0Share on StumbleUpon0Share on Reddit0Buffer this pageShare on Tumblr0Flattr the author

Published by

Patrick Curl

Patrick Curl is a developer, coder, writer, blogger, affiliate marketer, and more. He lives and breathes apps/startups and has a permanent residency on HackerNews.

Leave a Reply

Your email address will not be published. Required fields are marked *