PHPackages                             timolake/livewire-tables - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Database &amp; ORM](/categories/database)
4. /
5. timolake/livewire-tables

ActiveLibrary[Database &amp; ORM](/categories/database)

timolake/livewire-tables
========================

An extension for Livewire that allows you to effortlessly scaffold datatables with optional pagination, search, and sort. based upon danielbinsmaier/livewire-tables and coryrose/livewire-tables

3.0.2(2mo ago)01.2k↓100%MITPHPPHP ^8.3

Since Nov 4Pushed 2mo agoCompare

[ Source](https://github.com/timolake/livewire-tables)[ Packagist](https://packagist.org/packages/timolake/livewire-tables)[ Docs](https://github.com/timolake/livewire-tables)[ RSS](/packages/timolake-livewire-tables/feed)WikiDiscussions master Synced 1mo ago

READMEChangelog (10)Dependencies (7)Versions (64)Used By (0)

Livewire-Tables
===============

[](#livewire-tables)

An extension for [Livewire](https://laravel-livewire.com/docs/quickstart/) that allows you to effortlessly scaffold datatables with optional pagination, search, and sort.
Based upon danielbinsmaier/livewire-tables and coryrose/livewire-tables

Installation
------------

[](#installation)

### Via Composer

[](#via-composer)

```
$ composer require timolake/livewire-tables
```

The package will automatically register its service provider.

To publish the configuration file to `config/livewire-tables.php` run:

```
php artisan vendor:publish --provider="timolake\LivewireTables\LivewireTablesServiceProvider"

```

### Manualy via github

[](#manualy-via-github)

add package mannualy to composer.json

```
    "require": {
        "timolake/livewire-tables": "master"
    },
    "repositories": [
        {
            "type": "vcs",
            "url": "https://github.com/timolake/livewire-tables"
        }
    ],

```

```
composer update

```

Usage
-----

[](#usage)

Livewire tables are created in three simple steps:

1. [Create a table component class](#create-a-table-component-class)
2. [Configure the table class using the available options](#configure-the-component-options)
3. [Scaffold the table view (as needed when component class changes)](#scaffold-the-table-view)

### Create a table component class

[](#create-a-table-component-class)

Run the make command to generate a table class:

`php artisan livewire-tables:make UsersTable`

*App/Http/Livewire/Tables/UsersTable.php*

```
...

class UsersTable extends LivewireModelTable
{
    use WithPagination;

        public $paginate = true;
        public $pagination = 10;
        public $hasSearch = true;

        public $fields = [
            [
                'title' => 'ID',
                'name' => 'id',
                'header_class' => '',
                'cell_class' => '',
                'sortable' => true,
            ],
            [
                'title' => 'Name',
                'name' => 'name',
                'header_class' => '',
                'cell_class' => '',
                'sortable' => true,
                'searchable' => true,
            ],
            [
                'title' => 'City',
                'name' => 'address.city',
                'header_class' => 'bolded',
                'cell_class' => 'bolded bg-green',
                'sortable' => true,
                'searchable' => true,
            ],
            [
                'title' => 'Post',
                'name' => 'post.content',
                'header_class' => '',
                'cell_class' => '',
                'sortable' => true,
                'searchable' => true,
            ],
        ];

        public function render()
        {
            return view('livewire.tables.users-table', [
                'rowData' => $this->query(),
            ]);
        }

        public function model()
        {
            return User::class;
        }

        public function with()
        {
            return ['address', 'post'];
        }
}

```

### Configure the component options

[](#configure-the-component-options)

First, set your base model in the `model()` method in the following format:

```
public function model()
{
    return User::class;
}

```

To eager load relationships, use the `with()` and return an array of relation(s):

```
public function with()
{
    return ['address', 'post'];
}

```

The following are editable public properties for the table class:

keydescriptionvaluedefault$paginateControls whether the data query &amp; results are paginated. If true, the class must `use WithPagination;`booltrue$paginationThe number value to paginate withinteger10$hasSearchControls global appearance of search barbooltrue[$fields](#$fields)The fields configuration for your tablearraynull[$css](#$css)Per-table CSS settingsarraynull#### $fields

[](#fields)

Controls the field configuration for your table

keydescriptionvaluetitleSet the displayed column titlestringnameShould represent the database field name. Use '.' notation for related columns, such as `user.address`stringheader\_classSet a class for the `` tag for this fieldstring or nullcell\_classSet a class for the `` tag for this fieldstring or nullsortableControl whether or not the column is sortablebool or nullsearchableControl whether or not the column is searchablebool or null#### $css

[](#css)

Used to generate CSS classes when scaffolding the table.

These can be set globally in the configuration file, or on a per-table basis in the component class.

*Note:* CSS classes set in the component will override those from the configuration file where both exist.

keydescriptionvaluewrapperCSS class for `` surrounding tablestring or nulltableCSS class for ``string or nulltheadCSS class for ``string or nullthCSS class for ``string or nulltbodyCSS class for ``string or nulltrCSS class for ``string or nulltdCSS class for ``string or nullsearch\_wrapperCSS class for `` surrounding searchstring or nullsearch\_inputCSS class for search ``string or nullpagination\_wrapperCSS class for `` surrounding pagination buttonsstring or null### Scaffold the table view

[](#scaffold-the-table-view)

When ready, scaffold the table view using the scaffold command:

`php artisan livewire-tables:scaffold UsersTable`

*resources/views/livewire/tables/users-table.blade.php*

```

    @if ($hasSearch)

            @if ($search)
                &#10005;
            @endif

    @endif

            ID
            Name
            City
            Post

        @foreach ($rowData as $row)

                {{ $row->id }}
                {{ $row->name }}
                {{ $row->address->city }}
                {{ $row->post->content }}

        @endforeach

    @if ($paginate)

        {{ $rowData->links() }}

    @endif

```

You can use the scaffold command continuously as you make changes to the parent component class.

Since the rendered template is simple HTML, there’s no need for table “slots” for customization - customize the template as you see fit!

Change log
----------

[](#change-log)

Please see the [changelog](changelog.md) for more information on what has changed recently.

Credits
-------

[](#credits)

- \[Cory Rosenwald\]\[link-author\]
- [Laravel Livewire](https://laravel-livewire.com/docs/quickstart/)
- \[All Contributors\]\[link-contributors\]

License
-------

[](#license)

MIT. Please see the [license file](license.md) for more information.

###  Health Score

55

—

FairBetter than 97% of packages

Maintenance93

Actively maintained with recent releases

Popularity16

Limited adoption so far

Community10

Small or concentrated contributor base

Maturity86

Battle-tested with a long release history

 Bus Factor1

Top contributor holds 71.4% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Every ~37 days

Recently: every ~11 days

Total

63

Last Release

67d ago

Major Versions

2.4.3 → 3.0.02024-12-18

1.18.1 → 2.8.12025-09-26

1.18.4 → 2.8.52025-09-26

1.18.5 → 2.8.62026-01-19

v1.x-dev → 3.0.12026-03-02

PHP version history (3 changes)2.1.0PHP ^8.1

3.0.0PHP ^8.2

3.0.1PHP ^8.3

### Community

Maintainers

![](https://www.gravatar.com/avatar/48d8ed9f1029d48dfe4828b920a79ba4fb2628a35f04ef4d004d769608f7e295?d=identicon)[timolake](/maintainers/timolake)

---

Top Contributors

[![timolake](https://avatars.githubusercontent.com/u/5251569?v=4)](https://github.com/timolake "timolake (105 commits)")[![crosenwald](https://avatars.githubusercontent.com/u/14092825?v=4)](https://github.com/crosenwald "crosenwald (21 commits)")[![coryrose1](https://avatars.githubusercontent.com/u/19687298?v=4)](https://github.com/coryrose1 "coryrose1 (12 commits)")[![danielbinsmaier](https://avatars.githubusercontent.com/u/53262425?v=4)](https://github.com/danielbinsmaier "danielbinsmaier (9 commits)")

---

Tags

laravellivewirelivewire-tables

###  Code Quality

TestsPest

### Embed Badge

![Health badge](/badges/timolake-livewire-tables/health.svg)

```
[![Health](https://phpackages.com/badges/timolake-livewire-tables/health.svg)](https://phpackages.com/packages/timolake-livewire-tables)
```

###  Alternatives

[livewire/volt

An elegantly crafted functional API for Laravel Livewire.

4195.3M84](/packages/livewire-volt)[coryrose/livewire-tables

An extension for Livewire that allows you to effortlessly scaffold datatables with optional pagination, search, and sort.

8841.5k](/packages/coryrose-livewire-tables)[tomshaw/electricgrid

A feature-rich Livewire package designed for projects that require dynamic, interactive data tables.

116.6k](/packages/tomshaw-electricgrid)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
