@extends('demand.layouts.main') @section('content')
Total Sub Services - {{$cars->total()}}
@if (isset(auth()->user()->provider->id) && auth()->user()->provider->c_car == 1 || auth()->user()->hasAnyRole('admin')) Create Provider Cars @endif
@role('admin') @else @endrole
@push('scripts') @endpush

@if (isset($cars) && !empty($cars)) @foreach ($cars as $k => $item) {{-- @canany(['edit_cars', 'delete_car-provider']) --}} {{-- @endcanany --}} @endforeach @endif
S.no Provider Name Car Name Image status Actions
{{($cars->perPage() * ($cars->currentPage() - 1)) + $k + 1}} {{ucfirst($item->provider->name)}} {{ucfirst($item->car->name)}}
active == 1 ? 'checked' : ''}} onchange="change_status('{{$item->id}}', 'car_provider', '#customSwitchGlow{{$item->id}}', 'active');" id="customSwitchGlow{{$item->id}}">
{{method_field('DELETE')}} @csrf
{{ $cars->links() }}
@endsection