Using Roles on two models #2270
-
Hi there, I have another model 'Customer' and I want to also manage only its roles, Ex : Customer of this role is affected to that user, Customer of that role can receive mails,...... So I have this 'users_model_has_roles' table : role_id | model_type | model_id when I do : User::first()->roles and Customer::first()->roles all the results are good Thanks in advance |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment
-
The model comes from guard, you could change config default guard on the fly for Customers query |
Beta Was this translation helpful? Give feedback.
The model comes from guard, you could change config default guard on the fly for Customers query