<?php

namespace App\Livewire\Services;

use Livewire\Component;
use App\Models\ServiceCategory;

class ServicesOverview extends Component
{
    public function render()
    {
        $categories = ServiceCategory::where('status', 1)
            ->orderBy('position')
            ->with(['services', 'pageCms']) // 🔥 IMPORTANT
            ->get();

        return view(
            'livewire.services.index',
            compact('categories')
        )->layout('components.layout');
    }
}
