adspace


How to change your default database type in laravel?

Answer Posted / Preeti Gupta

In Laravel, you can change the default database connection by modifying the 'default' key in the 'database.php' configuration file located in the 'config' directory. You can specify different types of databases such as MySQL, PostgreSQL, SQLite, etc. Here's an example for changing to SQLite:nn```n'mysql' => [n '', // database namen '', // usernamen '', // passwordn '' // database hostn],nn'sqlite' => [n 'database' => env('DB_DATABASE', database_path('database.sqlite')),n '',n '',n ''n]n```

Is This Answer Correct ?    0 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Tell us have you used lumen before?

809


Do you know what version of laravel do you generally use?

839


How much laravel experience do you have?

815


What is latest version of laravel?

869


What is current stable version of laravel?

870