Support the ongoing development of →
Laravel Database Security
Last updated 1 year ago.

You can connect your database using .env file present in the root folder of laravel installation. Just put your database credentials (DB name, username, password) there.


I suggest you to follow this article steps for Laravel installation step by step on localhost
Last updated 5 years ago.

What is your hosting environment? Are you using something like xaamp or are you using Homestead?

I'm running laravel homestead via virtualbox for one project and straight nginx/mariadb via ubunutu on another project on a different machine. I use mysqlworkbench for both. It's great for working with databases.


You have to edit .env files. You have to add the database name, database user and database password if exists. Once you save it, you need to hit a command in the terminal 'php artisan serve'(Without quotes). Whenever you edit the .env file, make sure to hit that command. Thankyou. -Mayur


Hey, Makkaoui SalahEddine!

I'm a senior developer at Artiiseo Content Marketing Agency. If you're still having issues, I'd be happy to assist you. Reach out at your convenience!


Last updated 4 years ago.

Sign in to participate in this thread!


Your banner here too?


We'd like to thank these amazing companies for supporting us

Your logo here?

The Laravel portal for problem solving, knowledge sharing and community building.

© 2024 - All rights reserved.