IMPORTANT NOTICE: Since September 2022, I'm moving from this Teachable platform to my own LaravelDaily.com with this course and even more premium tutorials there. So, please subscribe to yearly/monthly membership there, this Teachable platform will not get new content anymore.
With any questions about the membership, email me [email protected]
This is a short almost-live-coding session where I create a Laravel Breeze project with separate areas for different users: Students, Teachers, and Admins.
The goal is to show you how to separate those subsystems in the Laravel structure.
Those different roles will have separate:
- Controller subfolders/namespaces
- Views subfolders
- Visual layouts
- Navigation menus
- Route groups
- Route name prefixes
- URL prefixes
Also, we'll create a Middleware, to protect each area only for its own role.
Notice: in this course, I create only a simple project without any logic inside, and without separate visual themes, my goal is to teach how to divide the Laravel structure into role areas.
PreviewIntro: What's Inside The Course (1:03)
PreviewInstall Breeze and Create Student Timetable Page (6:57)
StartRoute Group: 3 Ways to Separate Groups by Roles (5:18)
StartRemoving the Dashboard: Auto-Redirect to Student Timetable (2:21)
StartRole Model/Migrations, Seeder and Teacher Registration (5:17)
StartSeparating Teacher and Student Layouts (8:46)
StartAuto-Redirect to Correct Area after Login/Register (2:46)
StartPermissions: Restrict Role Areas with Middleware (3:15)
StartQuick Route Trick for Same Controllers in Different Namespaces (1:53)
StartWrapping it Up: Repeat Same Logic for Admin Area (5:45)