@php use GalleryJsonMedia\JsonMedia\Contracts\HasMedia; /** @var HasMedia $record */ $record = $getRecord(); @endphp
@if(($record) and !$record->hasDocuments($getName())) @if(!$hasAvatars()) {{ $record->getFirstMedia($getName())?->withImageProperties($getThumbWidth(),$getThumbHeight()) }} @else
@foreach(collect($record->getMedias($getName()))->take($getMaxAvatars())->all() as $media) {{ $media->getCustomProperty('alt') }} @endforeach
@if(($nb = ($record->mediasCount($getName()) - collect($record->getMedias($getName()))->take($getMaxAvatars())->count())) > 0) + {{ $nb }} @endif @endif @endif