This is a homework managment system with only api for the following modules only.
- Student
- Teacher
- Homework
- HomeworkAssignment
Clone the repo or download the zip file and extract the code
git clone https://github.com/MarcusLEK/homework-management-system.git
Create a database on your local called laravel
and connect to it
CD into the code root directory and run the following command:
Note: If you are not using virtual host, please ensure php artisan serve
is running at all times during development/testing on a seperate terminal
composer install
npm install
php artisan migrate:fresh
php artisan db:seed
php artisan serve
Optionally, you can run the seeder with the following command:
Note: The homework and homework assignment model is not seeded by default
php artisan db:seed --class=HomeworkSeeder
php artisan db:seed --class=HomeworkAssignmentSeeder
- make sure the server is up and running before you test with postman
- in the root folder of this project, there is a postman collection json file which you can import into your postman.
- login with either the student or teacher account and replace the bearer token in the collection Auth tab.
Note: the data shown in the image may differ from the db due to the seed. Password for all accounts is 123
- No policy is implemented, therefore any teachers can update/delete other teacher homework and homework assignment.