[英]How to configure my SQLite database with my Laravel project?
I had created a database named Grocs.db using sqlite3 .The path of the database is C:\\Sqlite\\Grocs.db . 我使用sqlite3创建了一个名为Grocs.db的数据库。数据库的路径是C:\\ Sqlite \\ Grocs.db 。
How can I configure this Grocs.db database into my Laravel Project? 如何将此Grocs.db数据库配置到我的Laravel项目中?
Is it fine to simply move this database to the my laravel project's database folder? 将此数据库移动到我的laravel项目的数据库文件夹是否可以? ie to the path mylaravelproject/database ?
即到路径mylaravelproject /数据库 ?
If it is done by the above method, then what about the extension .db ? 如果是通过上面的方法完成的,那么扩展名.db呢? Should I have to change the extension from Grocs.db to Grocs.sqlite ?
我是否必须将扩展名从Grocs.db更改为Grocs.sqlite ?
You can configure the database connection in the ./.env
file of the application. 您可以在应用程序的
./.env
文件中配置数据库连接。
DB_CONNECTION=sqlite
DB_DATABASE=/absolute/path/to/database.sqlite
The Laravel database documentation contains the 'SQLite Configuration' section. Laravel数据库文档包含“SQLite配置”部分。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.