private function mapAdditionalDetails($collectionItems)
    {
        $collectionItems->map(function ($collectionItem) {
            $eventTime = Carbon::parse($collectionItem->updated_at);
            $collectionItem['timePassed'] = $eventTime->diffForHumans();
            $collectionItem['userAgentDetails'] = UserAgentDetails::details($collectionItem->useragent);
            $collectionItem['langDetails'] = UserAgentDetails::localeLang($collectionItem->locale);
            $collectionItem['userDetails'] = config('LaravelLogger.defaultUserModel')::find($collectionItem->userId);

            return $collectionItem;
        });

        return $collectionItems;
    }
private function mapAdditionalDetails($collectionItems)
    {
        $collectionItems->map(function ($collectionItem) {
            $eventTime = Carbon::parse($collectionItem->updated_at);
            $collectionItem['timePassed'] = $eventTime->diffForHumans();
            $collectionItem['userAgentDetails'] = UserAgentDetails::details($collectionItem->useragent);
            $collectionItem['langDetails'] = UserAgentDetails::localeLang($collectionItem->locale);
            $collectionItem['userDetails'] = config('LaravelLogger.defaultUserModel')::find($collectionItem->userId);

            return $collectionItem;
        });

        return $collectionItems;
    }
private function mapAdditionalDetails ( $ collectionItems ) { $ collectionItems -> map ( function ( $ collectionItem ) { $ eventTime = Carbon :: parse ( $ collectionItem -> updated_at ) ; $ collectionItem [ 'timePassed' ] = $ eventTime -> diffForHumans ( ) ; $ collectionItem [ 'userAgentDetails' ] = UserAgentDetails :: details ( $ collectionItem -> useragent ) ; $ collectionItem [ 'langDetails' ] = UserAgentDetails :: localeLang ( $ collectionItem -> locale ) ; $ collectionItem [ 'userDetails' ] = config ( 'LaravelLogger.defaultUserModel' ) :: find ( $ collectionItem -> userId ) ; return $ collectionItem ; } ) ; return $ collectionItems ; }
Add additional details to a collections.

@param collection $collectionItems

@return collection
Add additional details to a collections .