Ok, the Model class uses the saving() method to hook into the saving event, but what if I need to use another saving() event on the child?
class Car extends Model {
protected static $rules = [];
public static function boot() {
parent::boot();
static::saving(function($model) {
$model->doStuff(); // <- this doesn't execute
});
}
}
Ok, the
Model
class uses thesaving()
method to hook into thesaving
event, but what if I need to use anothersaving()
event on the child?