Database Connection

First create a database for your app.

Once you create it then we need to assign the database connection setting in our app. We will assign the database configuration settings in database.php file located in app/config/database.php

database.php file
database.php file

In this files you need to assign the host,username,password and database name.

Database config settings
Database config settings

I am using MySQL, so I have have made the settings in mysql.

That’s it! You are ready to use your database in your app.

Share this article: