2

I had created a database named Grocs.db using sqlite3 .The path of the database is C:\Sqlite\Grocs.db.

  • How can I configure this Grocs.db database into my Laravel Project?

  • Is it fine to simply move this database to the my laravel project's database folder? i.e. to the path mylaravelproject/database ?

  • If it is done by the above method, then what about the extension .db? Should I have to change the extension from Grocs.db to Grocs.sqlite?

1 Answer 1

5

You can configure the database connection in the ./.env file of the application.

DB_CONNECTION=sqlite
DB_DATABASE=/absolute/path/to/database.sqlite

The Laravel database documentation contains the 'SQLite Configuration' section.

Sign up to request clarification or add additional context in comments.

3 Comments

its worked! 😇 maybe beginners are little bit confused with the term 'absolute path'.Here I used the full path where the database resides.i.e, "C:\Sqlite\grocs.sqlite".
and I have to change my database name from Grocs.db to Grocs.sqlite.. 😊
yeah... it makes no differnece in changing the 'file ending ' of a database.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.