Model Has Role with another variable #2443
Replies: 1 comment 1 reply
-
Beta Was this translation helpful? Give feedback.
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
Today my project supports users register, and user can manage, invoices, companies, units and others models. But one user has an role and this give permissions for every companies. I want to set up the role, by user and by company.
for example: my name is samuel. in the company_id 1 I`m admin but in company 2 I'm only a user. how can is setup this case, if I create a new field in the table by migration and add this on method $user->assignRole($role, $company_id) it will work?
Beta Was this translation helpful? Give feedback.
All reactions