I've come across this scenario of connecting to
Sqlite database, mainly when quickly prototyping something with laravel.
As usual, its a quick thing with your laravel application. It is also mentioned in the official docs here.
- Create your DB file (
yourdb.sqlite) file anywhere within your application. I prefer to create it in
storagefolder such as
- Change your
To enable foreign key constraints for SQLite connections, you should add the
foreign_key_constraints option to your
config/database.php configuration file:
'sqlite' => [ // ... 'foreign_key_constraints' => true, ],