@forelse ($gallery as $item)
@php
$pathWithYear =
'https://storage.googleapis.com/iffi-goa-public-bucket-0001/uploads/gallery/2024/';
$pathWithoutYear =
'https://storage.googleapis.com/iffi-goa-public-bucket-0001/uploads/';
if (str_contains($item->img_url, $pathWithYear)) {
$imageName = str_replace($pathWithYear, '', $item->img_url);
} else {
$imageName = str_replace($pathWithoutYear, '', $item->img_url);
}
@endphp