Part 10 - CRUD Programmes
PREREQUISITES
- Finished Laravel exercise -> Part 9 - Authentication
- Finished Laravel -> Admin genres (p1)
- In this part you have to build a fully operational CRUD for the programmes
- You have to use a resource route and a resource controller!
- Every route corresponding to this programmes CRUD is only accessible if you are logged in AND you have admin rights
TIP
Create admin middleware to protect these routes from unauthorized access
REMARK
In comparison with the genres CRUD that we discussed in the course, we did not include alerts (to inform the admin of its successful create/update/delete operations) nor Bootstrap tooltips in this CRUD. Feel free to add them as an extra exercise if you want ...
Index
TIP
Use a Bootstrap list-group to list the different programmes
Create new programme
Edit a programme
Show details of a programme
TIP
When we click on a programme we go to a detail page via the 'show' route/method. At this detail page we also want to show all the (alphabetically sorted) courses for this programme. To accomplish this you have to build a new query (based on the programme_id
) and include the courses with it. The result of this query can be passed along with the 'show'-view.
Delete a programme