Inscrivez-vous ou connectez-vous pour rejoindre votre communauté professionnelle.
Find .env file under your project directory
DB_DATABASE=attendance_system DB_USERNAME=muzai DB_PASSWORD=xxxx
For connecting your app with DB in laravel you have to configure .env file in your project.
like for MySQL:
DB_CONNECTION=mysql
DB_HOST=127.0.0.1
DB_PORT=3306
DB_DATABASE=xyz
DB_USERNAME=root
DB_PASSWORD=
For laravel 5 use .env file
DB_CONNECTION=mysqlDB_HOST=127.0.0.1DB_PORT=3306DB_DATABASE=mydbDB_USERNAME=myuserDB_PASSWORD=mypass
update fields according to my connection
told me first laravel 5 or 4 ??
Use DotENV file. You have all the options there
Database configuration file path is : config/database.php
'mysql' => [
'read' => [ 'host' => 'localhost', ], 'write' => [ 'host' => 'localhost' ], 'driver' => 'mysql', 'database' => 'database', 'username' => 'root', 'password' => '', 'charset' => 'utf8', 'collation' => 'utf8_unicode_ci', 'prefix' => '', ],