@php use Illuminate\Support\Facades\Auth; $role = Auth::user()->role; @endphp @extends('backend.layouts.app') @section('PageTitle', 'Services') @section('content')

Services

Create Service

@foreach ($services as $service) @endforeach
ID Name Description Subcategory Vendors Status Creator Actions
{{ $service->id }} {{ $service->name }} {{ $service->description }} {{ $service->subCategory->sub_category_name }} @foreach ($service->vendors as $vendor) {{ $vendor->shop_name }}
@endforeach
{{ $service->status }} {{ $service->creator->name }} @if ($role === 'admin' || $service->vendors->contains('vendor_id', Auth::user()->vendor->vendor_id))
@csrf @method('DELETE')
@endif
@endsection