{{$i + $trips->firstItem()}} |
|
{{$trip->bus->bus_reg_no}} |
@if($trip->bus->class == 1)
VVIP
@elseif($trip->bus->class == 2)
VIP
@elseif($trip->bus->class == 3)
Luxury
@elseif($trip->bus->class == 4)
Semi-Luxury
@else
Ordinary
@endif
|
{{$trip->trip_date}} |
{{ date("g:ia", strtotime($trip->departure)) }} |
{{$trip->arrival}} |
@php
if(\Illuminate\Support\Facades\Auth::user()->role == 1){
$seats = \Illuminate\Support\Facades\DB::table('bookings')->where('schedule_id', $trip->id)->where('status', '1')->get()->count();
}else{
$seats = \Illuminate\Support\Facades\DB::table('bookings')->where('schedule_id', $trip->id)->where('status', '1')->where('company', Auth::user()->company)->get()->count();
}
echo $seats;
@endphp
|
{{$trip->label}} |
|
@if($trip->boarding_status == 'On Journey')
On Journey
@elseif($trip->boarding_status == 'Booking is OPEN')
OPEN
@elseif($trip->boarding_status == 'Booking is CLOSED')
CLOSED
@else
{{ $trip->boarding_status }}
@endif
|
{!! Form::open(array(
'style' => 'display: inline-block;',
'method' => 'GET',
'route' => ['Edit Trip', $trip->id])) !!}
{!! Form::submit('Edit', array('class' => 'mb-2 mr-2 btn-icon btn-sm btn-primary')) !!}
{!! Form::close() !!}
{!! Form::open(array(
'style' => 'display: inline-block;',
'method' => 'POST',
'onsubmit' => "return confirm('".trans("Are sure you want to Delete Trip")."');",
'route' => ['Delete Trip', $trip->id])) !!}
{!! Form::submit('Delete', array('class' => 'mb-2 mr-2 btn-icon btn-icon-only btn btn-danger')) !!}
{!! Form::close() !!}
{!! Form::open(array(
'style' => 'display: inline-block;',
'method' => 'GET',
'route' => ['Message Trip', $trip->id])) !!}
{!! Form::submit('Message', array('class' => 'mb-2 mr-2 btn-icon btn-sm btn-info')) !!}
{!! Form::close() !!}
offline == 0 ? 'checked' : '' }}>
|
@endforeach