How to Connecting to Database in Laravel ?
Answers were Sorted based on User's Feedback
Answer / surbhi
Configure the database in config/database.php file and create the college database with structure in MySQL.
Database: College
Table: student
| Is This Answer Correct ? | 0 Yes | 0 No |
Answer / Dharamveer
To connect to a database in Laravel, you need to configure the database connection details in the `.env` file and define the database connection in the `config/database.php` file. After that, you can use the Eloquent ORM (Object-Relational Mapper) to interact with the database.
| Is This Answer Correct ? | 0 Yes | 0 No |
What is mass assignable in laravel?
How do I use sub-domain routing?
Do you know what is the latest version of laravel?
How will you describe bundles in laravel?
How to use the custom table in laravel model?
What is database migration. How to create migration via artisan?
What is the function of die?
Explain events in laravel?
List out the plateforms laravel homestead supports?
What is map function in laravel?
How to get Retrieving a Cookie in Laravel ?
Is laravel faster than rails?