How To Connect Your Project To Database in Laravel 9

Published: 30 January 2023
on channel: QuantumWeb
23
0

Running out of time to connect your project to the database? Learn how to use Laravel 9 in this video and save hours of coding. Get ready to get hands-on with the most advanced framework and create a secure and robust project in no time. Don't wait and start connecting your project to the database now Follow these Steps to Connect and Create your Databse!
1. In the first step, you need to connect your project to database in Laravel. For this, you need to edit the .env file.

2. In the .env file, you need to set the following things-

DB_CONNECTION

DB_HOST

DB_PORT

DB_DATABASE

DB_USERNAME

DB_PASSWORD

3. After setting the database configuration, you need to run the following command in the terminal-

php artisan config:cache

4. In the next step, you need to create a migration file. For this, you need to run the following command in the terminal-

php artisan make:migration create_users_table

5. In the next step, you need to edit the created file and add your table attributes

6. Now go to PhpMyAdmin and select the migration you created


Watch video How To Connect Your Project To Database in Laravel 9 online without registration, duration hours minute second in high quality. This video was added by user QuantumWeb 30 January 2023, don't forget to share it with your friends and acquaintances, it has been viewed on our site 23 once and liked it 0 people.