Skip to content
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

[Question] How to dispatch events to log actions ? #5

Closed
pastanislas opened this issue May 25, 2020 · 1 comment
Closed

[Question] How to dispatch events to log actions ? #5

pastanislas opened this issue May 25, 2020 · 1 comment

Comments

@pastanislas
Copy link

Hello, sorry if this is obvious I'm new to laravel and voyager.
I'm trying to use model-log to log (eh !) but I'm facing issue when using a custom controller with a save action on the model.
Ie :
Changing the model with Voyager bread -> works as expected
Changing the model with myCustomController() [..] $myModel->save() doesn't update model-log table.

I've tryed to dispatch events event(new BreadDataUpdated($dataType, $myModel)) but without success.
Could you point me to the right direction ?
Thanks.

@pastanislas
Copy link
Author

OK everything is working fine, I wasn't saving the model, but updating it.
ie: update($query)
and this doesn't trigger save events.
Thanks for your work

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant