@php $userId = auth()->id(); $docs = cache("user:{$userId}:user_docs"); $docsCount = count($docs); $hoursSaved = $docsCount * 3; $textDocsCount = $docs->filter(fn($entity) => $entity->generator?->type == 'text')?->count(); $imageDocsCount = $docs->filter(fn($entity) => $entity->generator?->type == 'image')?->count(); $audioDocsCount = $docs->filter(fn($entity) => $entity->generator?->type == 'audio')?->count(); $otherDocsCount = $docsCount - $textDocsCount - $imageDocsCount - $audioDocsCount; $sum = $textDocsCount + $imageDocsCount + $audioDocsCount; $chatbots = cache("user:{$userId}:user_chatbots"); $chatbotCount = count($chatbots); @endphp

@lang('Account Summary')

@lang('Hours Saved')

{{ $hoursSaved }}

@lang('Documents')

{{ $docsCount }}

@lang('Chatbots')

{{ $chatbotCount }}


@lang('Document Overview')

@lang('View All')
@lang('Text') {{ $textDocsCount }}
@lang('Image') {{ $imageDocsCount }}
@lang('Audio') {{ $audioDocsCount }}
@lang('Other') {{ $otherDocsCount }}