Laravel Livewire Datatable Example

This article is to example what is Livewire Datatable and the usage.

Patrick Wan
3 min readMar 13, 2022

--

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',
];

Other

--

--

Patrick Wan

My name’s Patrick. I’m a Software Developer, experience in Laravel, Vue Js, React Js, Livewire, Jquery, Codegniter, NPM, GIT. I have 5 years plus experience.