Skip to content
Open Source · MIT Licensed

Define in PHP.Render anywhere.

Backend-driven dynamic tables for Laravel + Inertia.js.
Columns, sorting, search, and pagination - all from a single PHP class.

composer require forjedio/inertia-table+
npm install vendor/forjedio/inertia-table/reactornpm install vendor/forjedio/inertia-table/vue

One class. Full table.

Define columns, sorting, and search in PHP. The frontend handles the rest.

app/Tables/CompanyTable.php
use Forjed\InertiaTable\Table;
use Forjed\InertiaTable\Column;
use Forjed\InertiaTable\Columns\{
    TextColumn, DateColumn,
    ActionsColumn
};

class CompanyTable extends Table
{
    protected string $defaultSort = 'name';

    protected function columns(): array
    {
        return [
            TextColumn::make('name', 'Company')
                ->sortable(),
            TextColumn::make('industry', 'Industry')
                ->sortable(),
            TextColumn::make('website', 'Website')
                ->sortable(),
            DateColumn::make('founded_at', 'Founded')
                ->format('Y')
                ->sortable(),
            ActionsColumn::make(),
            Column::data('id'),
        ];
    }
}
Pages/Companies.tsx
import { InertiaTable } from 'inertia-table-react';
import { Bell } from 'lucide-react';

export default function Companies({ companies }) {
    return (
        <InertiaTable
            tableData={companies}
            actions={(row) => (
                <button onClick={() => alert(row.id)}>
                    <Bell className="h-4 w-4" />
                    Alert
                </button>
            )}
        />
    );
}

// Search, sorting, pagination
// all work automatically.

The result

This is what the code above produces - a fully interactive table with search, sorting, and pagination.

Inertia Table demo in light mode

Everything you need

A complete table system - not just a component.

11 Column Types

Text, Badge, Boolean, Date, DateTime, Link, Copyable, Component, Enum, Actions, and hidden data columns - plus icon modifiers for any column.

PHP Source of Truth

Column definitions, sorting rules, search fields, and display formatting all live in one PHP class. No duplication.

Full Override Control

Every element is replaceable - cells, headers, search, pagination, empty state, toolbar. Via render props or slots.

Frontend & Backend Hooks

Table hooks modify queries and data from outside the class. Frontend hooks connect tableSettings to JavaScript for realtime updates, analytics, or any custom behaviour.

Fully Extendable

Use the useTable hook with shadcn/ui, Headless UI, or your own components. Override any element or build the entire table from scratch.

Dark Mode

All default styles include dark: variants. Works automatically with your Tailwind dark mode configuration.

Start building in minutes

One Composer install, one npm install, one PHP class - you have a complete table.

Read the docs