Answers for "spatie/laravel-activitylog display only changed data"

PHP
0

spatie/laravel-activitylog display only changed data

protected static $logAttributes = [];     

public static function boot()
{
    parent::boot();
    static::saving(function (Model $model) {
        static::$logAttributes = array_keys($model->getDirty());
    });
}
Posted by: Guest on August-29-2020

Code answers related to "spatie/laravel-activitylog display only changed data"

Browse Popular Code Answers by Language