@extends('admin.layouts.app') @section('title', 'Routes') @section('content') {{-- Boarding Stops--}} @include('admin.includes.alerts')
Register Route {{-- --}} {{-- --}} @foreach($routes as $i => $route) {{-- --}} @endforeach
SN Route Code Company Origin Destination Via Distance Hours Status Action
{{$i + $routes->firstItem()}} {{\App\Models\Cities::where(['id' => $route->start_point])->first()->city}} - {{\App\Models\Cities::where(['id' => $route->end_point])->first()->city}} {{$route->route_code}} {{\App\Models\Company::where(['id' => $route->company])->first()->name}} {{\App\Models\Cities::where(['id' => $route->start_point])->first()->city}} {{\App\Models\Cities::where(['id' => $route->end_point])->first()->city}} {{$route->via}} {{$route->distance}} {{$route->approximate_hours}} @if($route->status == 1) Active @elseif($route->status == 0) Inactive @else No Information @endif {!! Form::open(array( 'style' => 'display: inline-block;', 'method' => 'GET', 'route' => ['View Route', $route->id, \App\Models\Cities::where(['id' => $route->start_point])->first()->city, \App\Models\Cities::where(['id' => $route->end_point])->first()->city, $route->code])) !!} {!! Form::submit('Details', array('class' => 'mb-2 mr-2 btn-icon btn-sm btn-dark')) !!} {!! Form::close() !!} {!! Form::open(array( 'style' => 'display: inline-block;', 'method' => 'POST', 'onsubmit' => "return confirm('".trans("Are sure you want to Delete this Route")."');", 'route' => ['Delete Route', $route->id])) !!} {!! Form::submit('Delete', array('class' => 'mb-2 mr-2 btn-icon btn-sm btn-danger')) !!} {!! Form::close() !!}
{{ $routes->links() }}
@endsection