Answers for "livewire emit"

1

livewire event

inside livewire controller
$this->emit('eventName');

inside livewire blade file
<script type="text/javascript">
    window.onload = function() {
        Livewire.on('eventName', () => {
           // Code Here
        })
    }
</script>
Posted by: Guest on January-22-2021
0

livewire emit

1<button wire:click="$emit('postAdded')">
Posted by: Guest on September-25-2021

Browse Popular Code Answers by Language