@php use Carbon\Carbon; $time = Carbon::now(); $printDate = $time->format('Y/m/d'); $printTime = $time->format('H:i:s'); @endphp @for ($i = 0; $i < ceil($traveler->count() / $setting['rows']); $i++)
@if ($setting['useAgency'] || $setting['useAgencyConnect']) @endif {{-- --}} @if ($setting['useDocName']) @endif
@if ($setting['useAgency'])
{{ $company['name'] }}
@endif @if ($setting['useAgencyConnect'])
地址:{{ $company['postcode'] }}{{ $company['city'] . $company['area'] . $company['address'] }} 電話:{{ $company['phone'] }}
@endif
團名:{{ $product['tourCode'] }} {{ $product['name'] }}
列印日期 {{ $printDate }}
列印時間 {{ $printTime }}
{{ $setting['name'] }}
@foreach ($field as $oKey => $oItem) @php $fieldWidth = collect($oItem)->reduce(function($max, $item, $key){ $maxTemp = collect($item)->max("width"); if($maxTemp > $max){ $max = $maxTemp; } return $max; }, 0); @endphp @endforeach @if ($isGroup) @foreach ($traveler->skip($i * $setting['rows'])->take($setting['rows']) as $tKey => $tItem) @foreach ($tItem as $tKeys => $tItems) @foreach ($field as $oKey => $oItem) @php $checkField = collect($oItem)->reduce(function ($temp, $item, $key) { collect($item)->each(function ($items, $keys) use ($temp) { $temp->push($items['field']); }); return $temp; }, collect()); @endphp @if ($checkField->search('roomCode') !== false && $tKeys == 0) @elseif ($checkField->search('roomCode') !== false && $tKeys != 0) @else @endif @endforeach @endforeach @endforeach @else @foreach ($traveler->skip($i * $setting['rows'])->take($setting['rows']) as $tKey => $tItem) @foreach ($field as $oKey => $oItem) @endforeach @endforeach @endif
0) echo "style='width: {$fieldWidth}px'" @endphp> @foreach ($oItem as $vKey => $vItem)
@foreach ($vItem as $hKey => $hItem) {{ $hItem['name'] }} @endforeach
@endforeach
@foreach ($oItem as $vKey => $vItem)
@foreach ($vItem as $hKey => $hItem) {{ $tItems[$hItem['values']] }} @endforeach
@endforeach
@foreach ($oItem as $vKey => $vItem)
@foreach ($vItem as $hKey => $hItem) {{ $tItem[$hItem['values']] }} @endforeach
@endforeach
@endfor