Skip to content

v12.62.0

@eyupcanakman eyupcanakman tagged this 05 Mar 16:20
* Fix after-commit observers breaking -ing event cancellation

When an observer sets $afterCommit = true, all methods including -ing
events get wrapped to run after commit. This loses the return value
from creating/updating/etc., so returning false no longer cancels
the operation.

Skip the after-commit wrapping for halting event methods (creating,
updating, saving, deleting, restoring, forceDeleting) so they fire
synchronously and cancellation works as expected.

Fixes #56400

* formatting

---------

Co-authored-by: Taylor Otwell <taylor@laravel.com>
Assets 2
Loading