- Frontend: No frontend
- Backend: http://localhost:80/api
- Database
- Hostname:
mysql
- Port:
3306
- Username:
root
- Password:
- Database:
loan_app
- Hostname:
- PHP 8.1.4
- Laravel Framework 9.19.0
- MySQL 8.0
- PHPStorm
- MySql
- Laravel
- Some spatie packages
- Composer install
- Copy the
.env.example
to.env
and fill the values - php artisan key:generate && php artisan migrate:fresh --seed
- Use the postman collection to test the api
git clone https://github.com/nitinkaware/loan-app
Go to the project directory
cd loan-app
Install dependencies
composer install
Start the server with Sail - (make sure you have docker installed) OR Laravel Valet (Valet Preferences)
Run tests
php artisan test
Run migrations and seed the database
php artisan migrate:fresh --seed
POST /api/register
Parameter | Type | Description |
---|---|---|
email |
string |
Required. |
name |
string |
Required. |
password |
string |
Required and must match with password_confirmation |
password_confirmation |
string |
Required |
This api is same for both users and admins.
POST /api/login
Parameter | Type | Description |
---|---|---|
email |
string |
Required |
password |
string |
Required |
device_name |
string |
Required |
POST /api/loan-requests
Parameter | Type | Description |
---|---|---|
amount_required |
float |
Required |
terms_in_week |
integer |
Required |
No request payload required.
POST /api/loan-requests/approve/{loan}
POST /api/loan-repayments/repayment/{repayment}
Parameter | Type | Description |
---|---|---|
amount_paid |
float |
Required |
GET /api/loans
Parameter | Type | Description |
---|---|---|
cursor |
string |
Optional |