{{ __('application.report.parking_slots_report') }}

@if ($request['place_id'] != 'all')
{{ __('application.report.place') }}: {{ $places->where('id', $request['place_id'])->first()->name }}
@endif @if (isset($request['floor_id']) && $request['floor_id'] != NULL)
{{ __('application.report.floor') }}: {{ $floors->where('id', $request['floor_id'])->first()->name }}
@endif @if (isset($request['category_id']) && $request['category_id'] != NULL)
{{ __('application.report.brand') }}: {{ $categories->where('id', $request['category_id'])->first()->type }}
@endif

@foreach ($slots as $slot) @foreach($slot->groupBy('floor_id') as $floorWiseSlots) @php $totalSlot = count($floorWiseSlots); $bookedSlot = count($floorWiseSlots->whereNotNull('parking_id')); $availableSlot = $totalSlot - $bookedSlot; @endphp
{{ __('application.report.parking_slots_place') }} : {{ $slot[0]->place_name }} , {{ __('application.report.parking_slots_floor') }} : {{ $floorWiseSlots[0]->floor_name }}, {{ __('application.report.parking_slots_total_slot') }} : {{ $totalSlot }}, {{ __('application.report.parking_slots_booked') }} : {{ $bookedSlot }}, {{ __('application.report.parking_slots_available') }} {{ $availableSlot }}
@php $sl = 1; @endphp @foreach($floorWiseSlots->groupBy('category_id') as $categorySlot) @php $totalSlot = count($categorySlot); $bookedSlot = count($categorySlot->whereNotNull('parking_id')); $availableSlot = $totalSlot - $bookedSlot; @endphp @endforeach
{{ __('application.report.parking_slots_serial') }} {{ __('application.report.parking_slots_category') }} {{ __('application.report.parking_slots_total_slot') }} {{ __('application.report.parking_slots_booked') }} {{ __('application.report.parking_slots_available') }} {{ __('application.report.parking_slots_available_slot') }}
{{ $sl++ }} {{ $categorySlot[0]->category_name }}{{ $totalSlot }} {{ $bookedSlot }} {{ $availableSlot }} {{ $categorySlot->whereNull('parking_id')->pluck('slot_name')->implode(', ') }}
@endforeach @endforeach