Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR PHP

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());
    });
}
Source by github.com #
 
PREVIOUS NEXT
Tagged: #display #changed #data
ADD COMMENT
Topic
Name
4+3 =