Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/dubniczky/book-rental
Book rental system in Laravel with blade templating and sqlite
https://github.com/dubniczky/book-rental
brs composer laravel php rentalsystem
Last synced: 6 days ago
JSON representation
Book rental system in Laravel with blade templating and sqlite
- Host: GitHub
- URL: https://github.com/dubniczky/book-rental
- Owner: dubniczky
- License: mit
- Created: 2022-07-21T09:42:31.000Z (over 2 years ago)
- Default Branch: master
- Last Pushed: 2022-07-21T09:59:26.000Z (over 2 years ago)
- Last Synced: 2024-05-02T05:43:06.627Z (10 months ago)
- Topics: brs, composer, laravel, php, rentalsystem
- Language: PHP
- Homepage:
- Size: 813 KB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Laravel Book Rental System
Book rental system in Laravel with blade templating and sqlite.
## Support ❤️
If you find the project useful, please consider supporting, or contributing.
[!["Buy Me A Coffee"](https://www.buymeacoffee.com/assets/img/custom_images/orange_img.png)](https://www.buymeacoffee.com/dubniczky)
## Description
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.
## Versions
- PHP: `v7.4.3`
- Composer: `v2.3.3`
- Laravel: `v8.83.6`## Scripts
- Install php and composer: `install.sh`
- Generate Laravel project from scratch: `initialize.sh`
- Install dependencies and seed database: `prepare.sh`
- Reset database: `dbreset.sh`## Usage
### 1. Install dependencies
```bash
composer install
npm install
```### 2. Generate required assets
```bash
npm run prod
```### 4. Prepare and seed database
> This step should only be done if you are running a development version.
> Clear database before deployment!```bash
php artisan migrate:fresh
php artisan db:seed
```### 5. Start the server
```bash
php artisan serve
```### 6. Navigate to local server
> Note: the port should be visible after running step 5.
[http://127.0.0.1:8000](http://127.0.0.1:8000)
## Useful commands
### Create a new model with all components
```bash
php artisan make:model MODELNAME -a
```### Quick reset database
```bash
./dbreset.sh
```