Spatie\Activitylog\Traits\LogsActivity::eventsToBeRecorded PHP Method

eventsToBeRecorded() protected static method

* Get the event names that should be recorded.
protected static eventsToBeRecorded ( ) : Collection
return Illuminate\Support\Collection
    protected static function eventsToBeRecorded() : Collection
    {
        if (isset(static::$recordEvents)) {
            return collect(static::$recordEvents);
        }
        $events = collect(['created', 'updated', 'deleted']);
        if (collect(class_uses(__CLASS__))->contains(\Illuminate\Database\Eloquent\SoftDeletes::class)) {
            $events->push('restored');
        }
        return $events;
    }