December 2016
Beginner
189 pages
3h 5m
English
© Sanjib Sinha 2017
Sanjib Sinha, Beginning Laravel, 10.1007/978-1-4842-2538-7_7
Sanjib Sinha1
(1)Howrah, West Bengal, India
Laravel comes with many stunning features. One of them is definitely database migrations. In the next chapter we’ll discuss migration in detail.
Before that we need to understand our environment properly. What is environment in Laravel? If you look at the document root you will find an ‘.env’ file. It basically tells us about the database connections. Where would we get that default database setup file? In the ‘config’ folder, we have a ‘database.php’ file. Open it up and see the content.
We see a line that tells us about the default database connection.
//config/database.php'default' => env('DB_CONNECTION', 'mysql'), ...
Read now
Unlock full access