I usually use a pivot table and have many-to-many relationship between users and roles. It might be a little complex for your needs, but I often base just use https://github.com/spatie/laravel-permission for managing user access throughout the application.
Duel roles
In one of my systems, I used to have separate login tables. Just same user name and password.
If an Admin was logged in, but could also do bookkeeping, they logged out and re-logged in.
Problem is now I have just one table with roles. As example say these are some roles.
roles
-------------
admin
bkeep // for bookkeeper
admin,bkeep // both roles
user
There is one lady who is setup for admin and helps with bookkeeping. She can login and do both.
I have no problem allowing the bkeep role access to those methods, or admin role accessing admin methods.
I am trying to figure the best way to allow a duel user (admin,bkeep) to access either method. Just wondering how do some of you handle it.
Just admin can do anything except no bookkeeping.
Thank snapey for this, he got me on the one table thing.
Please or to participate in this conversation.