Look in to the spatie package called permissions. It has both roles and permissions. I use it all the time
A system with several user roles.
I'm making a system with user roles like admin, teacher and student, but I don't know how to approach it yet. I just finished the laravel 8 from scratch series. I need some idea because its still confusing for me.
I was thinking that I can put them all in one table like Users table for example since they're all users, but I was wondering if its ok to do it like that since they would all have different columns, a student would have Grade column for instance but the admin and teacher won't need that.
So I thought it would be better if they have their own respective tables then that would allow me to set relationships since I would have to do it for teacher and student. But still I have no idea if this is the right way.
I haven't started the development yet. I only have a little idea about the roles and permissions part. I would appreciate any help, thanks!
Please or to participate in this conversation.