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
I was wondering whether the increment and decrement methods on Eloquent models are intended to dispatch saving and saved events? In the Laravel 8 upgrade guide, it mentions that "Proper "update" and "save" related model events will now be dispatched" (https://laravel.com/docs/8.x/upgrade#increment-decrement-events), which seems to imply that they are. The updating and updated events are indeed dispatched (incrementOrDecrement method in Model.php), but saving and saved do not seem to be. Is that the expected behavior, or were they inadvertently omitted?
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
Hi,
I was wondering whether the increment and decrement methods on Eloquent models are intended to dispatch
saving
andsaved
events? In the Laravel 8 upgrade guide, it mentions that "Proper "update" and "save" related model events will now be dispatched" (https://laravel.com/docs/8.x/upgrade#increment-decrement-events), which seems to imply that they are. Theupdating
andupdated
events are indeed dispatched (incrementOrDecrement
method in Model.php), butsaving
andsaved
do not seem to be. Is that the expected behavior, or were they inadvertently omitted?Thank you!
Beta Was this translation helpful? Give feedback.
All reactions