Using .env for your local build

This was one of the best changes to Laravel from version 4 and 5 in my opinion. When I was doing Ruby on Rails work, it also had this feature, and this is the key to help create an application that falls in the Twelve Factor App workflow. You will learn how to use this file for setting keys to some recipes later on in the book. In this example, we will start using it to set up our database.

For the rest of this book, I will use PHPStorm for my editor, which helped me a ton to explore Laravel and PHP code when I first started. Make sure your editor has plugins to easily click and explore classes.

Getting ready

When you installed Laravel, it copied the .env file into place. So, just open your editor of choice and open ...

Get Laravel 5.x Cookbook now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.