Installations
Please make sure to have the following installed on your device:
- PHP
- Laravel 7+
- XAMPP, this is necessary to install Apache and MySQL
- Postman, to test the backend
How to use the API
Register admin:
- In postman, enter the following URI as a POST request [http://localhost:8000/api/register]
- In the body, enter 'name', 'email', 'password', 'password_confirmation'
- send the request.
Admin Login:
- In postman, enter the following URI as a POST request [http://localhost:8000/api/login]
- In the body, enter
email
,password
- send the request
- copy the
access_token
from the resulting JSON
Add Payments till the end of the year
- Login
- Copy
access_token
and paste it in postman - send the following URI as POST [http://localhost:8000/api/projects/fillTable]
- Check the
projects
table to see the results
View Payments by month
- Login & Copy
access_token
and paste it in postman - send the following URI as GET [http://localhost:8000/api/projects/{month}]. Type
month
in the 3 letter Capitalized format (e.g. Aug)
Send Email Notifications
There is a command that checks if there is a payment within 2 days then sends a notification email to all admins.