Issue with Filament modal, Livewire And Lazy Load

Hi,

I had lazy loaded disabled and i am getting issue that i am unable to lazy load component even tho i did use ->with(), i think it is up to Livewire so tought to ask here if someone had similar issue?

<?php

namespace App\Livewire;

use App\Models\User;
use Illuminate\Support\Facades\Auth;
use Livewire\Attributes\Lazy;
use Livewire\Component;

#[Lazy]
class Guide extends Component
{
    public $guides;

    public function mount ()
    {
        $this->guides = \App\Models\Guide::query()->with(['parent', 'children',])->get();
    }

    public function render()
    {
        return view('livewire.guide');
    }

    public function openModal($userId = null): void
    {
        $user = $userId
            ? User::findOrFail($userId)
            : Auth::user();


        $this->userData = $user->toArray();
        $this->dispatch('open-modal', id: 'guide-modal');
    }
}
Was this page helpful?