Improved version of Jarek Tkaczyk superb hook system for Laravel.
Hooks are available for the following methods:
Model::getAttribute
Model::setAttribute
Model::save
Model::toArray
Model::replicate
Model::isDirty
Model::__isset
Model::__unset
and all methods available on the Illuminate\Database\Eloquent\Builder
class.
Additional hooks, mostly for all relation types, are:
Model::hasOne
Clone the repo or pull as composer dependency:
composer require codedge/hookable
Please see the original package for usage.