Livewire Events: Component Communication
December 24, 2025
•
1 min read
•
39 views
Table of Contents
Communicate between Livewire components:
Emit Events
$this->emit('postCreated', $post->id);
Listen to Events
protected $listeners = ['postCreated' => 'refreshList'];
public function refreshList($postId)
{
$this->posts = Post::all();
}
Emit to Specific Component
$this->emitTo('notifications', 'show', 'Post created!');
Browser Events
$this->dispatchBrowserEvent('alert', ['message' => 'Success!']);
Related Posts
Laravel Sanctum API Authentication Complete Guide
Build secure API authentication with Laravel Sanctum for SPAs and mobile apps.
Laravel Rate Limiting: Protect Your Application
Implement rate limiting to protect your Laravel application from abuse.
Laravel Blade Components: Build Reusable UI
Create powerful reusable components with Laravel Blade.
Comments (0)
No comments yet. Be the first to comment!