Current File : /home/getxxhzo/app.genicards.com/vendor/rappasoft/laravel-livewire-tables/README.md |

[](https://packagist.org/packages/rappasoft/laravel-livewire-tables)
[](https://github.com/rappasoft/laravel-livewire-tables/actions/workflows/php-cs-fixer.yml)
[](https://github.com/rappasoft/laravel-livewire-tables/actions/workflows/run-tests.yml)
[](https://packagist.org/packages/rappasoft/laravel-livewire-tables)
[](https://codecov.io/gh/rappasoft/laravel-livewire-tables)

### Enjoying this package? [Buy me a beer 🍺](https://www.buymeacoffee.com/rappasoft)
A dynamic Laravel Livewire component for data tables.


### [Bootstrap 4 Demo](https://tables.laravel-boilerplate.com/bootstrap-4) | [Bootstrap 5 Demo](https://tables.laravel-boilerplate.com/bootstrap-5) | [Tailwind Demo](https://tables.laravel-boilerplate.com/tailwind) | [Demo Repository](https://github.com/rappasoft/laravel-livewire-tables-demo)
## Installation
You can install the package via composer:
``` bash
composer require rappasoft/laravel-livewire-tables
```
You must also have [Alpine.js](https://alpinejs.dev) version 3 or greater installed and available to the component.
## Documentation and Usage Instructions
See the [documentation](https://rappasoft.com/docs/laravel-livewire-tables) for detailed installation and usage instructions.
## Basic Example
```php
<?php
namespace App\Http\Livewire\Admin\User;
use App\Domains\Auth\Models\User;
use Illuminate\Database\Eloquent\Builder;
use Rappasoft\LaravelLivewireTables\DataTableComponent;
use Rappasoft\LaravelLivewireTables\Views\Column;
class UsersTable extends DataTableComponent
{
protected $model = User::class;
public function configure(): void
{
$this->setPrimaryKey('id');
}
public function columns(): array
{
return [
Column::make('ID', 'id')
->sortable(),
Column::make('Name')
->sortable(),
];
}
}
```
### [See advanced example](https://rappasoft.com/docs/laravel-livewire-tables/v2/examples/advanced-example)
## Testing
```bash
composer test
```
## Changelog
Please see [CHANGELOG](CHANGELOG.md) for more information on what has changed recently.
## Contributing
Please see [CONTRIBUTING](.github/CONTRIBUTING.md) for details.
## Security Vulnerabilities
Please e-mail anthony@rappasoft.com to report any security vulnerabilities instead of the issue tracker.
## Credits
- [Anthony Rappa](https://github.com/rappasoft)
- [Joe McElwee](https://github.com/lrljoe)
- [All Contributors](./CONTRIBUTORS.md)
## License
The MIT License (MIT). Please see [License File](LICENSE.md) for more information.