Tell me how To Set Database Connection In Laravel?

Submitted by: Muhammad
Database configuration file path is : config/database.php

Following are sample of database file :

'mysql' => [
'read' => [
'host' => 'localhost',
],
'write' => [
'host' => 'localhost'
],
'driver' => 'mysql',
'database' => 'database',
'username' => 'root',
'password' => '',
'charset' => 'utf8',
'collation' => 'utf8_unicode_ci',
'prefix' => '',
],
Submitted by: Muhammad

Read Online Laravel PHP Developer Job Interview Questions And Answers