I would like to add sqlite db to my lumen app but I have some troubles. I create migration:
php artisan make:migration create_users_table --create=users
then I changed my .env file, so it looks like:
DB_CONNECTION=sqlite
DB_HOST=localhost
DB_DATABASE=database.sqlite
then I was created database.sqlite and put it in storage folder and when I 'm trying to do:
php artisan migrate
I have
[InvalidArgumentException]
Database (database.sqlite) does not exist.
I uncommented this lines in bootstrap/app.php:
Dotenv::load(__DIR__.'/../');
$app->withFacades();
I can't find what is wrong.
I work on ubuntu 14.04
In my .env file I changed to:
DB_CONNECTION=sqlite
# DB_HOST=localhost
# DB_DATABASE=database.sqlite
I left only
DB_CONNECTION=sqlite
So Lumen use default config from /vendor/laravel/lumen-framework/config/database.php. It works.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With