This is a small CRUD example showing how to use SQLite database with Laravel 10
Make sure that you have setup the environment properly. You will need minimum PHP 8.1, SQLite, and composer.
- Download the project (or clone using GIT)
- Copy
.env.example
into.env
- Edit
.env
, changeAPP_URL
andDB_DATABASE
to match your requirements - Go to the project's root directory using terminal window/command prompt
- Run
composer install
- Set the application key by running
php artisan key:generate --ansi
- Run
php artisan migrate –seed
(optional, a db file is already provided with some demo data) - Run migrations
php artisan migrate
(not required, there is no migration provided) - Start local server by executing
php artisan serve
- Run (example url) http://localhost:8081/laravel/sqlite/test/public/books to test the application