@extends('admin.layouts.app') @section('title', 'Routes') @section('content')
@php if(!empty($class)){ $x = $class; echo $x.' CLASS '; } @endphp

Distance {{ \App\Models\Route::where(['id' => $id])->first()->distance }} KM


BUS CATEGORIES

@foreach($classes as $i => $c) @if($c->class == 1)

@csrf

@elseif($c->class == 2)

@csrf

@elseif($c->class == 3)

@csrf

@elseif($c->class == 4)

@csrf

@else

@csrf

@endif {!! Form::open(array( 'style' => 'display: inline-block;', 'method' => 'GET', 'route' => ['Print Route', $id])) !!} {!! Form::submit('Print Route', array('class' => 'btn btn-sm btn-dark')) !!} {!! Form::close() !!} @endforeach
@include('admin.includes.alerts')
{!! Form::open(array( 'style' => 'display: inline-block;', 'method' => 'GET', 'route' => ['Create Sub Route', $id, $from, $to, $code])) !!} {!! Form::submit('Register Sub-Routes', array('class' => 'mb-2 mr-2 btn-icon btn-sm btn-danger')) !!} {!! Form::close() !!}
{{-- --}} {{-- --}} @foreach($subroutes as $i => $subroute) @csrf {{-- --}} @endforeach
Select AllSN Route Class Min Price Adjustment Commision Seats Limit Duration(Hour) Distance Total FareStatusAction
{{$i + $subroutes->firstItem()}} @php $pointA = \Illuminate\Support\Facades\DB::table('routes')->where('id', $subroute->route)->where('status', '1')->value('start_point'); $pointB = \Illuminate\Support\Facades\DB::table('routes')->where('id', $subroute->route)->where('status', '1')->value('end_point'); $from = \Illuminate\Support\Facades\DB::table('cities')->where('id', $pointA)->value('city'); $to = \Illuminate\Support\Facades\DB::table('cities')->where('id', $pointB)->value('city'); echo $subroute->pointA.' - '.$subroute->pointB; @endphp @if($subroute->class == 1) VVIP @elseif($subroute->class == 2) VIP @elseif($subroute->class == 3) Luxury @elseif($subroute->class == 4) Semi-Luxury @else Ordinary @endif {{ $subroute->fare ?? old('fare') }} is_deleted == 0 ? 'checked' : '' }}>
@forelse ($boarding_stops as $index => $boarding_stop) @empty @endforelse
SN Region Stop Terminal Seq ETA (In minutes) Action Active
{{ $index + 1 }} {{ strtoupper($boarding_stop->city_name) }} {{ strtoupper($boarding_stop->stop_name) }} {{ strtoupper($boarding_stop->terminal_name) }} {{ $boarding_stop->sequence }} {{ $boarding_stop->eta_in_minute }} is_active == 1 ? 'checked' : '' }}>
No Boarding Stops Available!
@foreach($agents ?? '' as $i => $agent) @csrf @endforeach
SN Agent Mobile Type Seat Address Action
{{$i + $agents->firstItem()}} @php $name = \Illuminate\Support\Facades\DB::table('agents')->where('msisdn', $agent->msisdn)->value('name'); echo $name; @endphp {{ $agent->msisdn }} @if($agent->type == 1) Non-Commisioned @elseif($agent->type == 2) Commisioned @else N/A @endif {{ $agent->seat_start }} - {{ $agent->seat_end }} {{ $agent->address }}
@include('admin.routes.footer') @endsection