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
If you are using laravel events https://laravel.com/docs/5.2/eloquent#events with metable in model, While creating or updating the record model event is executing twice as metable is updating the record with metafield once the record has been saved using model eloquent..
The text was updated successfully, but these errors were encountered:
After a lot of debuging, I found out that my problem had something to do with laravel... Idk how but I found a workaround.
My issue was: when I fire an event from the booted model function (static::saved) I will be able to assign the new value of the model to a global variable, but inside the broadcastWith function, I will not get the new value (but the old one). Idk what causes this, but if I dispatch my event with event::dispatch it works like a charm
If you are using laravel events https://laravel.com/docs/5.2/eloquent#events with metable in model, While creating or updating the record model event is executing twice as metable is updating the record with metafield once the record has been saved using model eloquent..
The text was updated successfully, but these errors were encountered: