You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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?
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
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