@php $galleryId = $galleryId ?? 'shipPhoto'; $photoShipments = $photoShipments ?? collect(); $photoTitle = $photoTitle ?? ($photoShipments->count().' shipment(s)'); $photoItems = []; foreach ($photoShipments as $galleryShipment) { $galleryPhotos = $galleryShipment->photos ?? collect(); foreach ($galleryPhotos as $galleryPhoto) { if (empty($galleryPhoto->photo_path)) { continue; } $photoItems[] = [ 'url' => \Illuminate\Support\Facades\Storage::disk('s3')->url($galleryPhoto->photo_path), 'name' => $galleryPhoto->photo_name ?: ($galleryShipment->tracking_number ?: 'Photo'), ]; } } @endphp
@push('scripts') @endpush