The lase-peco/datatables adds robust and easy to customize datatables build with the Laravel Livewire library.
We are still working on this package to bring new features.
- PHP 8.0+
- Laravel 8.x
- Livewire 2.x
- Tailwindcss 3.x
You can install the package via composer:
composer require lase-peco/datatablesAll generated datatables has the following features:
- Column sorting.
- Pagination.
- Include specific columns. (optional)
- Exclude Specific columns. (optional)
... and many new features on the way!
Just add in your "View" the following:
<livewire:datatable model="App\Models\User"/>Define in the model attribute the Eloquent Model, for which you like to generate the datatable.
You can specify which columns to include in the table and in which order by using the include attribute. Just provide the needed columns seperated with a comma.
<livewire:datatable model="App\Models\User" include="name,email,created_at,id"/>This will give you a table with the provided columns in the provided order.
You can specify which columns to exclude from the table by using the exclude attribute. Just provide the unwanted columns seperated with a comma.
<livewire:datatable model="App\Models\User" exclude="name,id"/>This will give you a table with all columns form the provided eloquent model except the excluded ones.
composer testPlease see CONTRIBUTING for details.
If you discover any security related issues, please email a.dabak@lase-peco.com instead of using the issue tracker.
The MIT License (MIT). Please see License File for more information.
