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 ?
Be part of JetBrains PHPverse 2026 on June 9 – a free online event bringing PHP devs worldwide together.
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??
Please or to participate in this conversation.