protected static function eventsToBeRecorded()
    {
        if (isset(static::$recordEvents)) {
            return collect(static::$recordEvents);
        }

        $events = collect([
            'created',
            'updated',
            'deleted',
        ]);

        if (collect(class_uses(__CLASS__))->contains(SoftDeletes::class)) {
            $events->push('restored');
        }

        return $events;
    }
protected static function eventsToBeRecorded()
    {
        if (isset(static::$recordEvents)) {
            return collect(static::$recordEvents);
        }

        $events = collect([
            'created',
            'updated',
            'deleted',
        ]);

        if (collect(class_uses(__CLASS__))->contains(SoftDeletes::class)) {
            $events->push('restored');
        }

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