@php
$cols = $sizeConfig['cols'];
$rows = $sizeConfig['rows'];
$totalPages = ceil($totalStickers / $perPage);
$brandLogoPath = public_path('build/custom/khayl-logo.png');
$hasBrandLogo = file_exists($brandLogoPath);
$productImagePath = $product->image_path ? public_path('storage/' . $product->image_path) : null;
$hasProductImage = $productImagePath && file_exists($productImagePath);
@endphp
@php $idx = 0; @endphp
@for($p = 0; $p < $totalPages; $p++)
@for($r = 0; $r < $rows; $r++)
@for($c = 0; $c < $cols; $c++)
@if($idx < $totalStickers)
@if($hasProductImage)
@endif
|
|
{{ $product->name }}
|
|
@else
|
@endif
@php $idx++; @endphp
@endfor
@endfor
@endfor