How to change your default database type in laravel?
Answer / 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 |
What is an api route?
Explain laravel contracts?
What is laravel dependency injection?
What is namespace in php laravel?
Tell me what are system requirement for laravel 5.0?
What are the advantages of queue?
What is a Laravel - Contracts ?
What is use of middleware in laravel?
What is a laravel collection?
Is laravel secure?
Explain the difference between laravel 4 and laravel 5?
What is laravel horizon?