I am new to Laravel 5.1 and am currently working on a project to personally familiarize myself with Laravel.
I have many tables in my application, but I'm stuck on a certain plural relationship between 3 tables (which Pivot tables might need to use).
So I have 3 tables:
The following rules apply to relationships:
- A user can have from 0 to many projects
- Access to the project is possible by many different users.
- The user gets some rights to a specific project depending on its role.
- The user has an โactiveโ project from which the application receives its data. Users can change their "active" project from the list of projects.
(permissions are associated with roles and allow a user with a specific role to perform a specific set of actions in a project)
At first, I had users โ Roles that worked well (as far as the code is concerned), but the role defined for the user allowed me to make a predefined set of things for each project (which is not flexible enough for me).
I already saw another post with approx. the same title as mine , but I'm afraid it cannot satisfy my needs, because the properties are stored in the intersection table, although in my case I already have a physical table.
source share