I have done a lot of reading on this but nothing stands out. I already have a authentication and authorisation system that can handle multiple guards and user roles (user, admin, super admin etc.)
I am trying to find out what is the best way to separate the system into totally separate accounts which have the following;
No login section
- Landing page. Anyone can see without login.
Admin Section
- Admin side of the system has a super-admins and then multiple admin-users.
- These users can see all data from every user who has an account on the client side.
Client Section
- Each user account has an owner who deals with billing, their own user admin etc.
- Each client account also has a number of users (admin-users, editor-users etc.) with varying permissions.
- Users on this side should only ever be able to see their own accounts data. They should not be able to ever see other accounts data.
Before Laravel, I would have an accounts table and assign a unique key to each account. Then a separate users table would contain the user along with their account key.
All database tables from this point onwards (posts, products, shipments etc.) would also have this key to ensure that the user account could only see their own data.
On top of this there would be permission tables, for granular control of what each user from either side can see.
Is my original way still suited to Laravel or is there a better way?