Database (database/database.sqlite) does not exist. Database works from artisan tinker Database (database/database.sqlite) does not exist. Database works from artisan tinker database database

Database (database/database.sqlite) does not exist. Database works from artisan tinker


You need to use full path, something like:

DB_DATABASE=/home/laravel-project/database/database.sqlite


If you remove DB_DATABASE=... from your .env file and use the path in the config/database.php:

'database' => env('DB_DATABASE', database_path('database.sqlite')),...

(if your database.sqlite file is in database/ folder), it will work, too.


I ran the following commands:

php artisan config:cache

php artisan config:clear

php artisan serve - restarted the server