piranha-software / livewire-grid
PiranhaGrid - The small, but powerful, data grid package for Laravel Livewire
Requires
- php: ^8.5
- livewire/livewire: ^4.4.0
- spatie/laravel-package-tools: ^1.19.0
Requires (Dev)
- carthage-software/mago: ^1.44.0
- livewire/flux: ^2.22
- orchestra/testbench: ^11.0
- pestphp/pest: ^4.0
- pestphp/pest-plugin-laravel: ^4.0
- phpstan/extension-installer: ^1.4
- phpstan/phpstan-deprecation-rules: ^2.0
- phpstan/phpstan-phpunit: ^2.0
Suggests
None
Provides
None
Conflicts
None
Replaces
None
This package is auto-updated.
Last update: 2026-12-04 15:01:57 UTC
README
Aggressively Simple Data Grid for Livewire
Small, yet powerful, PiranhaGrid provides sorting, filtering, searching, pagination, actions, and more. Wrapped in a fully themeable package that works with any dataset.
Full Documentation
Full documentation can be found at https://grid.piranha.software.
Quick Start
Installation
Install PiranhaGrid using Composer:
composer require piranha-software/livewire-grid
Publish the configuration file with:
php artisan vendor:publish --tag=piranha-grid-config
Which creates the config/piranha-grid.php configuration file.
Create
To create a new PiranhaGrid, extend the Piranha\Grid\Livewire\Component class
and implement the configure() and dataset() methods.
<?php declare(strict_types=1); namespace App\Livewire; use App\Models\User; use Illuminate\Contracts\Pagination\LengthAwarePaginator; use Piranha\Grid\Livewire\Component; final class UsersGrid extends Component { protected function configure(): void { $this->column('name', 'Name'); $this->column('email', 'Email', type: 'email'); } protected function dataset(): LengthAwarePaginator { return User::paginate(); } }
Render
Just like any other Livewire component, you can render your PiranhaGrid in a Blade view using the Livewire directive:
<livewire:users-grid />
Changelog
A list of changes can be found in the CHANGELOG.md file.
License
MIT © George Palmer - Piranha Software
Vendor Licenses
Flowbite Icons (filter, chevron-sort, chevron-down, chevron-up, close, trash-bin, info-circle, spinner): MIT © 2024 Themesberg
Flowbite Theme (CSS class configurations): MIT © 2023 Bergside Inc.