protected static eventsToBeRecorded ( ) : |
||
return |
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;
}