Be part of JetBrains PHPverse 2026 on June 9 – a free online event bringing PHP devs worldwide together.

PRESTIGE2930's avatar

Livewire 3 only listens to events in the component folder and not globally in your livewire folder

I have this folder structure, roughly like this

|- livewire

	|- components (folder)

	|- layouts (folder)

	|- pages (folder)

note: all files in the livewire folder are livewire volt componets except fiels in the Layout folder, which is plain livewire.

in a file in the component folder i am dipatching an event to be listened to on a file in the layouts folder,

public function updateParam ($category) { return $this->dispatch('updateParam', category: $category)->to(Menu::class); }

// Layout file use Livewire\Attributes\Url; use Livewire\Component;

class Menu extends Component { #[\Livewire\Attributes\On('updateParam')] public function rework($category) { dd($category); } }

but i dont recive the event.

i have tried not specifying the "dispatch()->to()" , but stiil no event.

but i can access this same event on any file in the component folder.

any walkaround this??

0 likes
1 reply
vincent15000's avatar

Please format your code so that it's readable.

The folder structure has no impact on how Livewire listens to the events.

Why do you think that ?

Please or to participate in this conversation.