Livewire Bulk Actions Pattern
January 16, 2026
•
1 min read
•
29 views
Bulk actions pattern:
Component
public array $selected = [];
public bool $selectAll = false;
public function updatedSelectAll($value)
{
$this->selected = $value
? $this->users->pluck('id')->toArray()
: [];
}
public function deleteSelected()
{
User::whereIn('id', $this->selected)->delete();
$this->selected = [];
}
View
@foreach($users as $user)
@endforeach
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!