@php $total = count($data) @endphp @foreach($data as $page => $item) @if ($item["driver"] != "") @endif
This document was printed on: {{$item['now']}}

Delivery Method: {{$item["method_name"]}}

Truck {{$item["truck_no"]}} {{$item["driver"] != ""?"(".$item["driver"].")":""}} {{-- Remove this when there is no driver assigned --}}

Delivery Date: {{$item["date"]}}

@foreach($item["data"] as $index => $stop)
{{--

Stop #{{$stop["stop_no"]}}

--}} @if (count($stop["order"]) > 0) @php // $total_item = collect($stop["order"])->pluck('detail_order')->flatten(1)->count(); $total_item = collect($stop["installs"])->count(); @endphp @if ($total_item > 0) @foreach($stop["installs"] as $install) @endforeach

Stop #{{$stop["stop_no"]}}

Order# Install Qty
{{$install["order_no"]}} {{$install["install_name"]}} {{$install["quantity"]}}
@endif @endif
@endforeach @if($page != $total - 1)
@endif @endforeach