Customizing attributes being logged
To customize which attributes you want to log, you can use the $logAttributes
static property on your model. For example to only log the name
and slug
:
use Javaabu\Activitylog\Traits\LogsActivity;
class Category extends Model {
use LogsActivity;
protected static array $logAttributes = ['name', 'slug'];
}