Book rental system in Laravel with blade templating and sqlite.
If you find the project useful, please consider supporting, or contributing.
This project starts from a basic laravel template and implements users, book, genres and borrowing using Eloquent models and creates tables in a sqlite database with migrations. The database is seeded using model factories and seeders. The users have two main roles, reader and librarian, with their own permissions. Each registered user can borrow books, but a librarian has to approve the it, and also may chose to reject it.
The UI is generated using blade templates and styled with Bootstrap 5. Generating the web ui package requires installation of node packages and running install afterwards.
- PHP:
v7.4.3
- Composer:
v2.3.3
- Laravel:
v8.83.6
- Install php and composer:
install.sh
- Generate Laravel project from scratch:
initialize.sh
- Install dependencies and seed database:
prepare.sh
- Reset database:
dbreset.sh
composer install
npm install
npm run prod
This step should only be done if you are running a development version. Clear database before deployment!
php artisan migrate:fresh
php artisan db:seed
php artisan serve
Note: the port should be visible after running step 5.
php artisan make:model MODELNAME -a
./dbreset.sh