Skip to Main Content
Laravel 5 Essentials
book

Laravel 5 Essentials

by Martin Bean
April 2015
Beginner content levelBeginner
144 pages
3h 13m
English
Packt Publishing
Content preview from Laravel 5 Essentials

Preparing the database

Before we can expand the functionality of our routes, we need to define the models of our application, prepare the necessary database schema, and populate the database with some initial data.

Homestead ships with a MySQL server built in, so we can use MySQL for our database; however, it does require a little bit of configuration first, before we can use a MySQL database in our application.

The first step is to open our application's configuration file, which should have been created at .env when we created the application with Composer. Find the line that says DB_DATABASE=homestead and change it to DB_DATABASE=furbook.

We can also add the database name to our Homestead configuration file, so that the database is created automatically ...

Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Start your free trial

You might also like

Beginning Laravel: A beginner's guide to application development with Laravel 5.3

Beginning Laravel: A beginner's guide to application development with Laravel 5.3

Sanjib Sinha
Laravel 5.x Cookbook

Laravel 5.x Cookbook

Terry Matula, Alfred Nutile

Publisher Resources

ISBN: 9781785283017Supplemental Content