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
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
Sign in to participate in this thread!
We'd like to thank these amazing companies for supporting us