@extends('layouts.app') @section('content')
Services
@can('create services') Add Service @endcan
count() > 0) id="services-table" @endif class="table"> @php $countryList = function_exists('marketplaceAvailableCountries') ? marketplaceAvailableCountries() : []; @endphp @forelse($services as $service) @php $displayPrice = $service->price ?? ($service->plans?->first()?->price ?? null); $flagClass = $countryList[$service->country]['flag_class'] ?? 'fi fi-gb'; @endphp @empty @endforelse
Name Category Country Service Plans Amount / Price Slug Status Action
@if($service->logo) {{ $service->name }} @endif {{ $service->name }}
{{ $service->category->name ?? 'N/A' }} @if($service->country) {{ $service->country }} @else Global / All @endif @php $servicePlans = ($service->plans && $service->plans->isNotEmpty()) ? $service->plans : $service->effective_plans; @endphp @if($servicePlans && $servicePlans->isNotEmpty())
@foreach($servicePlans->unique(fn ($p) => strtolower(trim((string) $p->name))) as $p) {{ $p->name }} @endforeach
@else - @endif
@if($displayPrice !== null && $displayPrice > 0) ${{ number_format($displayPrice, 2) }} @else - @endif {{ $service->slug }} {{ $service->is_active ? 'Active' : 'Pending' }}
@can('update services') Edit @endcan @can('delete services')
@csrf @method('DELETE')
@endcan
No services found.
@if($services->hasPages() || $services->total() > 0) @endif
@endsection @if($services->count() > 0) @push('script') @endpush @endif