@extends('layouts.app') @section('content') {{-- Page Header --}} @if ($services->count() > 0) {{-- Services Table --}}

Services (Latest)

@foreach ($services as $service) @endforeach
# {{ __('Title') }} {{ __('Description') }} {{ __('Total Services') }} {{ __('Status') }} {{ __('Actions') }}
{{ $service->id }} {{ $service->title }} {{ Str::limit($service->description, 100) }} {{ is_array($service->services) ? count($service->services) : 0 }} @if (is_array($service->services) && count($service->services) > 0) @php // Count active and inactive services $activeCount = collect($service->services) ->where('status', 'active') ->count(); $inactiveCount = count($service->services) - $activeCount; @endphp {{ $activeCount }} Active {{ $inactiveCount }} Inactive @else N/A @endif
{{-- View --}}
@else
{{ __('No services found.') }}
@endif @endsection