Possible to make multiple guard with Fortify without Jetstream?
Hello everyone,
I want to create a school website and there are admins, teachers and students if there are references to determine what steps to create a login
I also use spatie/laravel-permission.
I would not use separate guards for this.
admins, teachers and students are all users - treat them as such. Control what they can do through authorization.
With your current plan, what if a teacher is also an admin?
Thank for your response ;)
Is it the same to create multiple guards in laravel 7 to be implemented in laravel 8? thanks
sir you mean want one table for everything?
Yes, one table is the better approach for the authentication system. You should use a role-based authorization system for different users.
And yes, multiple guards work the same in Laravel 8 as in Laravel 7. As discussed above, you don't need that ;)
sir how to handle different needed for example
teacher has NIK, Name
and student has NIM, Name
for approach one table?
My problem solved by Gate instead of guard
Can you please show me how you solved, Thank you.
Please or to participate in this conversation.