Laravel's event halting system prevents certain methods from cascading when any type of non-null content is returned. This is the case for the following methods:
deleting
saving
creating
updating
Since Model::boot() registers the saving event handler and always returns either true or false, the saving event is effectively rendered useless for any code that wants to implement this on models that extend \Way\Database\Model.
Proposed solution: the saving event should only return false on validation errors and should return null on succesful validation.
Laravel's event halting system prevents certain methods from cascading when any type of non-null content is returned. This is the case for the following methods:
Since Model::boot() registers the
saving
event handler and always returns eithertrue
orfalse
, thesaving
event is effectively rendered useless for any code that wants to implement this on models that extend\Way\Database\Model
.Proposed solution: the
saving
event should only returnfalse
on validation errors and should return null on succesful validation.