Getting started
InertiaX adds searchable, sortable, filterable tables to your Laravel + Inertia + React application. Define the data and columns in PHP, then render the table by name in React.
Laravel queries the data. InertiaX supplies the table UI and keeps its controls, URL state, and results in sync through Inertia partial reloads.
A table in two parts
Section titled “A table in two parts”Return a table as an Inertia prop:
use Inertia\Inertia;use InertiaX\Components\Table\Columns\NumberColumn;use InertiaX\Components\Table\Columns\TextColumn;use InertiaX\Facades\InertiaX;
return Inertia::render('Users/Index', [ InertiaX::table('users') ->data($users) ->addColumns([ NumberColumn::make('id')->numberCast('int'), TextColumn::make('name')->searchable()->sortable(), ]),]);Here, $users is the Eloquent query for the records your page displays. Render the matching prop:
import { InertiaX } from '@inertiax/react-inertia';
export default function UsersIndex() { return <InertiaX prop="users" />;}You can keep a small definition inline or move it into a reusable table class. Add filters, selection, and custom cell rendering as you need them.
Get started
Section titled “Get started”Follow Installation, then build your first table. Already have a table? Start with Columns, Search, or Filtering.