Laravel PHP Developer Question:

Download Job Interview Questions and Answers PDF

Tell me how To Set Database Connection In Laravel?

Laravel PHP Developer Interview Question
Laravel PHP Developer Interview Question

Answer:

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' => '',
],

Download Laravel PHP Developer Interview Questions And Answers PDF

Previous QuestionNext Question
Tell me what Is System Requirement For Installation Of Laravel 5.2 (latest Version)?Explain me how to assign multiple middleware to Laravel route ?