protected static function bootRecordsActivity()
    {
        foreach (static::getModelEvents() as $event)
        {
            static::$event(function ($model) use ($event)
            {
                $model->recordActivity($event);
            });
        }

        if (static::deleteActivityOnCascade())
        {
            static::deleting(function ($model)
            {
                $model->deleteActivity();
            });
        }
    }
protected static function bootRecordsActivity()
    {
        foreach (static::getModelEvents() as $event)
        {
            static::$event(function ($model) use ($event)
            {
                $model->recordActivity($event);
            });
        }

        if (static::deleteActivityOnCascade())
        {
            static::deleting(function ($model)
            {
                $model->deleteActivity();
            });
        }
    }
protected static function bootRecordsActivity ( ) { foreach ( static :: getModelEvents ( ) as $ event ) { static :: $ event ( function ( $ model ) use ( $ event ) { $ model -> recordActivity ( $ event ) ; } ) ; } if ( static :: deleteActivityOnCascade ( ) ) { static :: deleting ( function ( $ model ) { $ model -> deleteActivity ( ) ; } ) ; } }
Registers the event listeners
Registers the event listeners