laravel 5.2 sqlite connection error
The normal configuration in the config.php
file is expected to be
'sqlite' => [ 'driver' => 'sqlite', 'database' => env('DB_DATABASE', database_path('database.sqlite')), 'prefix' => '', ],
Furthermore, the appropriate way to mention the DB_DATABASE
in the .env
file is to specify the absolute file name, such as /var/www/laravel/database/database.sqlite
not the relative location.
For example, in Windows
DB_DATABASE=C:\wamp\www\laravel\database\database.sqlite
And this is what is mentioned in the Laravel Documentation
DB_DATABASE=/absolute/path/to/database.sqlite