@extends('layouts.dashboard') @section('content') @php $itemsCount = $catalog->items->count(); $withImages = $catalog->items->whereNotNull('image')->where('image', '!=', '')->count(); $withoutImages = $itemsCount - $withImages; $totalQty = $catalog->items->sum('qty'); $customerUrl = $catalog->status === 'active' && in_array($catalog->permanent_key, ['main', 'clearance'], true) ? route($catalog->permanent_key === 'main' ? 'catalogs.permanent.main' : 'catalogs.permanent.clearance') : route('catalogs.customer', $catalog); $permanentUrl = null; if (isset($catalog->user) && $catalog->user?->public_catalog_token) { $permanentUrl = url('/salesman/'.$catalog->user->public_catalog_token.'/catalog'); } @endphp
#{{ $catalog->id }} • {{ $catalog->created_at->format('d M Y h:i A') }}
First products shown like the generated catalog.