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