-
-
Notifications
You must be signed in to change notification settings - Fork 84
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Events for hooking #109
Comments
You can register all kinds of observers yourself. Events would be an overkill, as they're already there from Laravel core. :) |
got this problem too.. hooking to menu works but not to menu items tried with observer attached to MenuItem class but not firing
EDIT: |
Anyone have a problem with firing observer at Menu? |
Hi! I just tested the events and both Menu and MenuItem events seemed to work as intended. I added additional fixes for MenuItem updates in version 6.0.5. Are you sure you are not observing Menu while doing updates to MenuItems instead? |
Yup, "found them". What I ended up doing, if anyone is interested is next: App\Providers\AppServiceProvider
App\Observers\MenuObserver
and manually caching menus when I call them:
So, I guess, yes, the events are firing. Not sure why they |
Are there any events that are emitted when menu item is saved? It would be great if there is one as I'm caching the menu like this:
I would like to clear that cache when the item saved like this:
Cache::forget('categories');
I'm not sure if there are some events and if the standard observers would work.
The text was updated successfully, but these errors were encountered: