How to connect database in laravel 5.8
All of the configuration files for the Laravel framework are stored in the config directory. But, we will directly access Environment Configuration file i.e dot env (.env) file.
So in your .env file you will access many things like App_name, App_urls, database configuration,
Now , your .env file is setup and ready to start the project but before that make sure you have created a database in server, example in XAMPP, WAMPP or LAMP.
So, you are Successfully Configured with your database and start to serve your artisan.
Note: If you do any changes in .env file, restart or re-serve your artisan by using below command: