Can I add some actions on event "user changed role" ? #2632
-
I try to add some logic after user changed role. I can't use observer on model User or Role, because info saved into pivot table "model_has_roles". How I can do that? |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 1 reply
-
Seems like a laravel question |
Beta Was this translation helpful? Give feedback.
-
We've opted not to register a lot of events in this package. Someone has suggested an approach to overriding some methods in order to fire some events; you can see their post at #754 (comment) ... just be mindful that it relates to an older version of this package so you may have to adjust accordingly. |
Beta Was this translation helpful? Give feedback.
We've opted not to register a lot of events in this package.
In a lot of cases where you control the calls to this package's methods you can add your own event firing or activity logging, etc.
(Obviously if you're using a package that wraps itself around ours, then you may have less control there, but often you'll find events available there that you can fire instead.)
Someone has suggested an approach to overriding some methods in order to fire some events; you can see their post at #754 (comment) ... just be mindful that it relates to an older version of this package so you may have to adjust accordingly.