spatie 2flaravel activitylog display only changed data

Solutions on MaxInterview for spatie 2flaravel activitylog display only changed data by the best coders in the world

showing results for - "spatie 2flaravel activitylog display only changed data"
Isidora
05 Feb 2016
1protected static $logAttributes = [];     
2
3public static function boot()
4{
5    parent::boot();
6    static::saving(function (Model $model) {
7        static::$logAttributes = array_keys($model->getDirty());
8    });
9}
10