@foreach ($ArrRecentPhotoGalleryHomePage as $index => $gallery)
@php
$firstPhoto = $gallery->photos[0] ?? null;
$photoUrl = $firstPhoto
? Config::get('constants.Sitethumbnail') .
Config::get('constants.ALBUM_IMAGE_DIR') .
$firstPhoto->photopath
: null;
$galleryUrl =
Config::get('constants.SiteBaseurl') .
'photo/' .
\Illuminate\Support\Str::slug($gallery->title) .
'-' .
$gallery->id .
'.html';
$createdAt = \Carbon\Carbon::parse($gallery->created_at);
$dateDisplay =
$createdAt->diffInWeeks() > 1 ? $createdAt->format('d-F-Y') : $createdAt->diffForHumans();
@endphp
@if ($photoUrl)

@endif
{{ $dateDisplay }}
{{ $gallery->title }}
@endforeach