Laravel Livewire Datatable Example
This article is to example what is Livewire Datatable and the usage.
--
Laravel Livewire Tables is a plugin built for Laravel Livewire that allows you to create simple or advanced dynamic datatables.
Here are some examples:
In this article, I will show you installation of this package and how to create a simple datatables.
Note: This plugin assumes you already have Laravel Livewire 2.x and Alpine.js 2.x installed and configured in your project regardless of what theme you use.
Installation
You can install the package via composer:
composer require rappasoft/laravel-livewire-tables
Publishing Assets
Publishing assets are optional unless you want to customize this package.
php artisan vendor:publish --provider="Rappasoft\LaravelLivewireTables\LaravelLivewireTablesServiceProvider" --tag=livewire-tables-config php artisan vendor:publish --provider="Rappasoft\LaravelLivewireTables\LaravelLivewireTablesServiceProvider" --tag=livewire-tables-views php artisan vendor:publish --provider="Rappasoft\LaravelLivewireTables\LaravelLivewireTablesServiceProvider" --tag=livewire-tables-translations
The default frontend framework is Tailwind, but you also have the option to use Bootstrap 4 or Bootstrap 5 by specifying in the config file.
This is the contents of the published config file:
<?php
return [
/**
* Options: tailwind | bootstrap-4 | bootstrap-5. */
'theme' => 'tailwind',
];