fsdolphin
1534
27
Laravel

Connecting Laravel to Sqlite in Laravel 5.2

Posted 3 years ago by fsdolphin

Hi,

How can I connect to Sqlite db?

This is what I did that didn't work.

  1. Created project.
  2. Created database.sqlite inside the database folder (database\database.sqlite).
  3. Changed 'default' => env ('DB_CONNECTION', 'mysql'), to 'default' => env ('DB_CONNECTION', 'sqlite'), in the database.php file.
  4. Ran php artisan migrate.
  5. Got an error.

What files do I need to modify to establish connection to an Sqlite DB?

Do I need to change something in the .env file?

Thanks

Please sign in or create an account to participate in this conversation.

Reply to

Use Markdown with GitHub-flavored code blocks.