Coming From wire:model mean? wire:model is binding between component's class property and frontend, so in this way you can access it within the class and emit using this example,
$this->emit('postAdded', $post->id);
Be part of JetBrains PHPverse 2026 on June 9 – a free online event bringing PHP devs worldwide together.
The documentation gives an example that an event can be emitted from a template
<button wire:click="$emit('postAdded')">
or from component
$this->emit('postAdded');
Later it states that parameters can be passed but only gives example from component
$this->emit('postAdded', $post->id);
How can I achieve the same from a template? I've managed to pass hardcoded values
<button wire:click="$emit('postAdded', 'hardcoded-value')">
but I'd want it to be coming from wire:model.
Please or to participate in this conversation.