PHPackages                             manggala/laravel-datatable - 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. manggala/laravel-datatable

ActiveLibrary

manggala/laravel-datatable
==========================

Production-ready, keyboard-navigable, server-driven Data Table package for Laravel and Inertia.js applications.

v1.0.0(yesterday)00MITPHPPHP ^8.2 || ^8.3 || ^8.4

Since Aug 8Pushed yesterdayCompare

[ Source](https://github.com/IlhamHattaManggala/laravel-datatable)[ Packagist](https://packagist.org/packages/manggala/laravel-datatable)[ Docs](https://github.com/IlhamHattaManggala/laravel-datatable)[ RSS](/packages/manggala-laravel-datatable/feed)WikiDiscussions main Synced today

READMEChangelog (1)Dependencies (10)Versions (2)Used By (0)

Laravel Data Table 📊
====================

[](#laravel-data-table-)

[![Latest Stable Version](https://camo.githubusercontent.com/34e695c6016bc2a934a96bed696e29b2f2ab562a7134d65a55d00653cd506bea/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f76657273696f6e2d312e302e302d626c75652e737667)](https://github.com/IlhamHattaManggala/laravel-datatable)[![License](https://camo.githubusercontent.com/8bb50fd2278f18fc326bf71f6e88ca8f884f72f179d3e555e20ed30157190d0d/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f6c6963656e73652d4d49542d677265656e2e737667)](LICENSE)[![PHP Version](https://camo.githubusercontent.com/c559cae360157e13115fa60313ea2d6d31f345f9ddce4f7f40f6e4e455300844/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f7068702d253545382e32253230253743253230253545382e33253230253743253230253545382e342d3737374242342e737667)](composer.json)[![Laravel Version](https://camo.githubusercontent.com/8915adfde559c0cf27297606acb21524ab96f7e86148fa58d7e75f2924e355f3/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f6c61726176656c2d25354531302e3025323025374325323025354531312e3025323025374325323025354531322e3025323025374325323025354531332e302d4646324432302e737667)](composer.json)[![Inertia Support](https://camo.githubusercontent.com/20b9264aee303fcfd5c55a8c992f3784c87af9a307528270a9c7c3db4dab82aa/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f696e65727469612e6a732d52656163742532302537432532305675652d3935353345392e737667)](https://inertiajs.com)

**Laravel Data Table** (`manggala/laravel-datatable`) is a production-ready, keyboard-navigable, server-driven Data Table package designed specifically for Laravel applications powered by Inertia.js and React.

---

💡 Why Laravel Data Table?
-------------------------

[](#-why-laravel-data-table)

Data tables constitute over 80% of enterprise web applications, back-office administration portals, and SaaS dashboards. In the Laravel ecosystem, popular table packages (like Filament Tables, Livewire PowerGrid, or Rappasoft Datatables) are **100% bound to Livewire and Blade**.

Applications built with **Inertia.js** currently lack a native, server-driven data table package on Packagist. Developers are forced to rewrite pagination links, debounced search timers, multi-column sorting parameters, filter modals, row selection checkboxes, bulk action endpoints, and CSV exports manually for every single entity.

**Laravel Data Table** bridges this gap by introducing a **Server-Driven UI (SDUI)** table engine:

- **Fluent PHP Schema**: Declare table columns, badges, formatters, search rules, and bulk actions entirely in expressive PHP classes.
- **Sleek React UI Component**: Automatically renders a high-contrast, dark-mode-ready React table (``) with zero custom React boilerplate.
- **Seamless Inertia Integration**: Operates natively via `router.get()` &amp; `router.post()` for instant reactive updates without full page reloads.
- **Manggala Ecosystem Synergy**: Deeply integrates with `manggala/laravel-spotlight` for global command palette table searches and embeds as responsive widgets inside `manggala/laravel-dashboard-builder`.

---

🌟 Key Features
--------------

[](#-key-features)

FeatureDescription📋 **Fluent PHP Column Suite**`TextColumn`, `BadgeColumn`, `DateColumn`, `AvatarColumn`, `BooleanColumn`, `ImageColumn`, `ActionColumn`.🔍 **Debounced Global &amp; Column Search**Fast, 200ms debounced search streaming directly through Eloquent builder pipelines.🎛️ **Dynamic Filter Suite**`SelectFilter`, `DateRangeFilter`, `NumberRangeFilter`, `BooleanFilter`, `TernaryFilter`.⚡ **Reactive Bulk Actions**Execute bulk operations (Delete, Status Update, Export) on selected rows with confirmation modals.👁️ **Column Visibility &amp; Density Control**Empower users to show/hide columns and adjust row density (Compact, Normal, Comfortable).📥 **Streamed CSV/Excel Export**Export matching database records instantly to CSV without memory exhaustion.♿ **WCAG 2.1 AA Keyboard Trapping**Arrow key cell/row navigation, focus trapping, and hotkey actions (`/` to focus search, `Esc` to clear).🔒 **Role &amp; Gate Security**Protect columns, filters, and bulk actions using Laravel Gates, Policies, and Spatie Roles.---

📦 Installation
--------------

[](#-installation)

Install the package via Composer:

```
composer require manggala/laravel-datatable
```

Run the package installation command to publish configuration and Inertia React component views:

```
php artisan datatable:install
```

Optionally publish resources manually:

```
# Publish configuration file
php artisan datatable:publish --tag=config

# Publish React component views
php artisan datatable:publish --tag=views
```

---

🚀 Quick Start
-------------

[](#-quick-start)

### 1. Define a Data Table Class

[](#1-define-a-data-table-class)

Create a dedicated Table class extending `DataTable`:

```
namespace App\Tables;

use App\Models\User;
use Manggala\DataTable\Core\DataTable;
use Manggala\DataTable\Columns\TextColumn;
use Manggala\DataTable\Columns\BadgeColumn;
use Manggala\DataTable\Columns\AvatarColumn;
use Manggala\DataTable\Columns\DateColumn;
use Manggala\DataTable\Columns\ActionColumn;
use Manggala\DataTable\Filters\SelectFilter;
use Manggala\DataTable\Filters\DateRangeFilter;
use Manggala\DataTable\Actions\BulkAction;

class UsersTable extends DataTable
{
    public function query()
    {
        return User::query()->with('roles');
    }

    public function columns(): array
    {
        return [
            AvatarColumn::make('avatar_url')->label('')->size('sm'),
            TextColumn::make('name')->label('Full Name')->sortable()->searchable()->copyable(),
            TextColumn::make('email')->label('Email Address')->sortable()->searchable(),
            BadgeColumn::make('role')->label('Role')
                ->colors([
                    'admin' => 'red',
                    'editor' => 'yellow',
                    'user' => 'blue',
                ]),
            DateColumn::make('created_at')->label('Joined Date')->format('M d, Y')->sortable(),
            ActionColumn::make('actions')->label('Actions'),
        ];
    }

    public function filters(): array
    {
        return [
            SelectFilter::make('role')->options([
                'admin' => 'Administrator',
                'editor' => 'Editor',
                'user' => 'Regular User',
            ]),
            DateRangeFilter::make('created_at')->label('Registration Date'),
        ];
    }

    public function bulkActions(): array
    {
        return [
            BulkAction::make('delete')
                ->label('Delete Selected')
                ->icon('trash')
                ->danger()
                ->confirm('Are you sure you want to delete selected users?')
                ->action(fn ($ids) => User::destroy($ids)),
        ];
    }
}
```

---

### 2. Render Table in Inertia Controller

[](#2-render-table-in-inertia-controller)

```
namespace App\Http\Controllers;

use App\Tables\UsersTable;
use Illuminate\Http\Request;
use Inertia\Inertia;

class UserController extends Controller
{
    public function index(Request $request)
    {
        return Inertia::render('Users/Index', [
            'usersTable' => UsersTable::make()->render($request),
        ]);
    }
}
```

---

### 3. Mount Frontend Component in Inertia Page

[](#3-mount-frontend-component-in-inertia-page)

Include the `` component inside your Inertia React page:

```
import React from 'react';
import { InertiaTable } from '@/Components/InertiaTable';
import AuthenticatedLayout from '@/Layouts/AuthenticatedLayout';

export default function UsersIndex({ usersTable }) {
    return (

                        User Directory
                        Manage user accounts, roles, and permissions

                {/* Server-Driven Data Table */}

    );
}
```

---

🔒 Authorization &amp; Security
------------------------------

[](#-authorization--security)

Protect columns, actions, or filters based on Laravel Gates or User permissions:

```
// Protect bulk action using Laravel Gate
BulkAction::make('delete')
    ->can('delete-users')
    ->action(fn ($ids) => User::destroy($ids));

// Protect column based on custom closure condition
TextColumn::make('salary')
    ->when(fn ($user) => $user->isAdmin());
```

---

🔗 Manggala Ecosystem Synergy
----------------------------

[](#-manggala-ecosystem-synergy)

`manggala/laravel-datatable` integrates natively with the entire Manggala suite:

1. **`manggala/laravel-spotlight`**: Type `Cmd+K` -&gt; `"Filter Users by Admin"` to execute dynamic table filter preset triggers directly from the command palette.
2. **`manggala/laravel-dashboard-builder`**: Embed data tables as compact, live-updating widgets inside custom user dashboards.
3. **`manggala/laravel-settings`**: Auto-save column visibility and row density preferences directly into user setting manifests.

---

⚙️ Configuration Reference
--------------------------

[](#️-configuration-reference)

The published configuration file (`config/datatable.php`) controls default pagination limits and styling thresholds:

```
return [
    'per_page' => 15,
    'per_page_options' => [10, 15, 25, 50, 100],
    'search_debounce_ms' => 200,
    'default_density' => 'normal', // 'compact', 'normal', 'comfortable'
    'export' => [
        'chunk_size' => 1000,
    ],
];
```

---

📄 License
---------

[](#-license)

The MIT License (MIT). Please see [License File](LICENSE) for more information.

###  Health Score

41

—

FairBetter than 87% of packages

Maintenance100

Actively maintained with recent releases

Popularity0

Limited adoption so far

Community6

Small or concentrated contributor base

Maturity50

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 100% 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

Unknown

Total

1

Last Release

1d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/224dea5f2515377b0fe9b2b2489c98f79547d361113349dc2ecc4bf8b89050d6?d=identicon)[IlhamHattaManggala](/maintainers/IlhamHattaManggala)

---

Top Contributors

[![IlhamHattaManggala](https://avatars.githubusercontent.com/u/122850473?v=4)](https://github.com/IlhamHattaManggala "IlhamHattaManggala (2 commits)")

---

Tags

laravelgridinertiareactdatatabledata tabletable buildermanggala

###  Code Quality

TestsPest

Static AnalysisPHPStan

Code StyleLaravel Pint

### Embed Badge

![Health badge](/badges/manggala-laravel-datatable/health.svg)

```
[![Health](https://phpackages.com/badges/manggala-laravel-datatable/health.svg)](https://phpackages.com/packages/manggala-laravel-datatable)
```

###  Alternatives

[psalm/plugin-laravel

Psalm plugin for Laravel

3345.4M354](/packages/psalm-plugin-laravel)[api-platform/laravel

API Platform support for Laravel

58190.1k19](/packages/api-platform-laravel)[laravel/cashier

Laravel Cashier provides an expressive, fluent interface to Stripe's subscription billing services.

2.6k31.8M156](/packages/laravel-cashier)[laravel/scout

Laravel Scout provides a driver based solution to searching your Eloquent models.

1.7k57.2M670](/packages/laravel-scout)[laravel/ai

The official AI SDK for Laravel.

1.1k4.6M286](/packages/laravel-ai)[pressbooks/pressbooks

Pressbooks is an open source book publishing tool built on a WordPress multisite platform. Pressbooks outputs books in multiple formats, including PDF, EPUB, web, and a variety of XML flavours, using a theming/templating system, driven by CSS.

45844.8k1](/packages/pressbooks-pressbooks)

PHPackages © 2026

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