{{--@extends('admin.layouts.app')--}} {{--@section('title', 'Bus Manifests')--}} {{--@section('content')--}} {{-- @include('admin.includes.alerts')--}} {{--
--}} {{--
--}} {{-- --}} {{-- --}} {{-- --}} {{-- --}} {{-- --}} {{-- --}} {{-- --}} {{-- --}} {{-- --}} {{-- --}} {{-- --}} {{-- --}} {{-- --}} {{-- --}} {{-- --}} {{-- --}} {{-- @foreach($bookings as $i => $booking)--}} {{-- --}} {{-- --}} {{-- --}} {{-- --}} {{-- --}} {{-- --}} {{-- --}} {{-- --}} {{-- --}} {{-- --}} {{-- --}} {{-- --}} {{-- @endforeach--}} {{-- --}} {{--
SNBusScheduleTicketsRouteClassLabelStatusCompanyAction
{{$i + $bookings->firstItem()}}--}} {{-- @php--}} {{-- $bus = \App\Models\Bus::where(['id' => $booking->schedule->bus_id])->first()->bus_reg_no;--}} {{-- echo $bus;--}} {{-- @endphp--}} {{-- {{$booking->schedule->trip_date}} {{$booking->schedule->departure}}--}} {{-- @php--}} {{-- $tickets = \Illuminate\Support\Facades\DB::table('bookings')->where('status', '>', '2')->where('schedule_id', $booking->schedule_id)->get()->count();--}} {{-- echo $tickets;--}} {{-- @endphp--}} {{-- --}} {{-- @php--}} {{-- if($booking->schedule->route_id != null || $booking->schedule->route_id != 'NULL'){--}} {{-- $pA = \App\Models\Route::where(['id' => $booking->schedule->route_id])->first()->start_point;--}} {{-- $pB = \App\Models\Route::where(['id' => $booking->schedule->route_id])->first()->end_point;--}} {{-- $pointA = \App\Models\Cities::where(['id' => $pA])->first()->city;--}} {{-- $pointB = \App\Models\Cities::where(['id' => $pB])->first()->city;--}} {{-- echo $pointA .' - '.$pointB;--}} {{-- }else{--}} {{-- $from = \App\Models\SubRoute::where(['id' => $booking->sub_route_id])->first()->start_point;--}} {{-- $to = \App\Models\SubRoute::where(['id' => $booking->sub_route_id])->first()->end_point;--}} {{-- echo $from .' - '.$to;--}} {{-- }--}} {{-- @endphp--}} {{-- --}} {{-- @if(\App\Models\Route::where(['id' => $booking->schedule->route_id])->first()->class == 1)--}} {{-- VVIP--}} {{-- @elseif(\App\Models\Route::where(['id' => $booking->schedule->route_id])->first()->class == 2)--}} {{-- VIP--}} {{-- @elseif(\App\Models\Route::where(['id' => $booking->schedule->route_id])->first()->class == 3)--}} {{-- LUXURY--}} {{-- @elseif(\App\Models\Route::where(['id' => $booking->schedule->route_id])->first()->class == 4)--}} {{-- SEMI-LUXURY--}} {{-- @else--}} {{-- ORDINARY--}} {{-- @endif--}} {{-- {{$booking->schedule->label}}--}} {{-- @if($booking->status == 2)--}} {{-- Booking--}} {{-- @elseif($booking->status == 3)--}} {{-- Booking--}} {{-- @elseif($booking->status == 4)--}} {{-- Borded--}} {{-- @else--}} {{-- N/A--}} {{-- @endif--}} {{-- {{ \App\Models\Company::where(['id' => $booking->company])->first()->name }}{!! Form::open(array(--}} {{-- 'style' => 'display: inline-block;',--}} {{-- 'method' => 'GET',--}} {{-- 'route' => ['Print Manifest', $booking->schedule_id])) !!}--}} {{-- {!! Form::submit('Print Manifest', array('class' => 'btn btn-sm btn-dark')) !!}--}} {{-- {!! Form::close() !!}--}} {{-- {!! Form::open(array(--}} {{-- 'style' => 'display: inline-block;',--}} {{-- 'method' => 'GET',--}} {{-- 'route' => ['View Manifest', $booking->schedule_id])) !!}--}} {{-- {!! Form::submit('View', array('class' => 'btn btn-sm btn-info')) !!}--}} {{-- {!! Form::close() !!}--}} {{--
--}} {{-- {{ $bookings->links() }}--}} {{--
--}} {{--
--}} {{--@endsection--}} @extends('admin.layouts.app') @section('title', 'Bus Manifests') @section('content') @include('admin.includes.alerts')
@foreach($schedules as $i => $schedule) @endforeach
SN Bus Schedule Tickets Route Class Label Status Company Action
{{$i + $schedules->firstItem()}} @php $bus = \App\Models\Bus::where(['id' => $schedule->bus_id])->first()->bus_reg_no; echo $bus; @endphp {{$schedule->trip_date}} {{$schedule->departure}} @php $tickets = \Illuminate\Support\Facades\DB::table('booking_histories')->where('status', '>', '2')->where('schedule_id', $schedule->id)->get()->count(); echo $tickets; @endphp @php if($schedule->route_id != null || $schedule->route_id != 'NULL'){ $pA = \App\Models\Route::where(['id' => $schedule->route_id])->first()->start_point; $pB = \App\Models\Route::where(['id' => $schedule->route_id])->first()->end_point; $pointA = \App\Models\Cities::where(['id' => $pA])->first()->city; $pointB = \App\Models\Cities::where(['id' => $pB])->first()->city; echo $pointA .' - '.$pointB; }else{ $from = \App\Models\SubRoute::where(['id' => $schedule->bookings->sub_route_id])->first()->start_point; $to = \App\Models\SubRoute::where(['id' => $schedule->bookings->sub_route_id])->first()->end_point; echo $from .' - '.$to; } @endphp @if(\App\Models\Route::where(['id' => $schedule->route_id])->first()->class == 1) VVIP @elseif(\App\Models\Route::where(['id' => $schedule->route_id])->first()->class == 2) VIP @elseif(\App\Models\Route::where(['id' => $schedule->route_id])->first()->class == 3) LUXURY @elseif(\App\Models\Route::where(['id' => $schedule->route_id])->first()->class == 4) SEMI-LUXURY @else ORDINARY @endif {{$schedule->label}} @if($schedule->boarding_status == 'Booking is CLOSED') CLOSED @elseif($schedule->boarding_status == 'Booking is OPEN') OPEN @elseif($schedule->boarding_status == 'On Journey') BOARDING-JOURNEY @else @endif {{ \App\Models\Company::where(['id' => $schedule->company])->first()->name }} {!! Form::open(array( 'style' => 'display: inline-block;', 'method' => 'GET', 'route' => ['Print Manifest', $schedule->id])) !!} {!! Form::submit('Print Manifest', array('class' => 'btn btn-sm btn-dark')) !!} {!! Form::close() !!} {!! Form::open(array( 'style' => 'display: inline-block;', 'method' => 'GET', 'route' => ['View Manifest', $schedule->id])) !!} {!! Form::submit('View', array('class' => 'btn btn-sm btn-info')) !!} {!! Form::close() !!}
{{ $schedules->links() }}
@endsection