1. Open .env file and change to:

DB_CONNECTION=sqlite

REMOVE:

DB_HOST
DB_PORT
DB_DATABASE
DB_USERNAME
DB_PASSWORD

 

2. Create an empty file called database.sqlite

$ touch database/database.sqlite

 

3. Open config/database.php and change the following line from mysql to sqlite

$ code config/database.php

 

'default' => env('DB_CONNECTION', 'sqlite'),

 

4. Migrate as needed

php artisan migrate

 

Recommended: Install SQLite Viewer VS Code Extension