承接 forjedio/inertia-table 相关项目开发

从需求分析到上线部署,全程专人跟进,保证项目质量与交付效率

邮箱:yvsm@zunyunkeji.com | QQ:316430983 | 微信:yvsm316

forjedio/inertia-table

最新稳定版本:v1.1.1

Composer 安装命令:

composer require forjedio/inertia-table

包简介

Backend-driven dynamic tables for Laravel + Inertia.js

README 文档

README

Backend-driven dynamic tables for Laravel + Inertia.js. Define your entire table in PHP - columns, sorting, searching, pagination, and display formatting - and the frontend renders it automatically. No duplicated definitions, no frontend table logic, no state management.

Tests PHP Coverage Vue Coverage React Coverage Documentation License

Inertia Table

Quick Example

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

    protected function columns(): array
    {
        return [
            LinkColumn::make('name', 'Name')
                ->route('companies.show', ['company' => ':id'])
                ->sortable(),
            TextColumn::make('email', 'Email')->sortable(),
            EnumColumn::make('status', 'Status')->sortable(),
            BooleanColumn::make('active', 'Active'),
            DateTimeColumn::make('created_at', 'Created')->sortable(),
            ActionsColumn::make(),
            Column::data('id'),
        ];
    }

    protected function searchable(): array
    {
        return ['name', 'email'];
    }
}

Pass it to your Inertia page:

return Inertia::render('Companies/Index', [
    'companies' => CompanyTable::make(Company::query())->paginate(),
]);

Render it on the frontend:

import { InertiaTable } from 'inertia-table-react';

export default function Index({ companies }) {
    return <InertiaTable tableData={companies} />;
}

That's it. Search, sorting, pagination, and all cell rendering handled automatically.

Features

  • 11 column types - Text, Badge, Boolean, Date, DateTime, Link, Copyable, Enum, Component, Actions, and hidden data columns
  • Icon modifiers - withIcon() and asIcon() on any column with map, closure, or fixed icon support
  • Sorting - single-column with URL state, three-tier priority, - prefix for descending
  • Searching - global full-text search with configurable debounce
  • Pagination - full and simple modes with configurable per-page
  • Enum integration - PHP enums automatically render as coloured badges
  • Table hooks - beforeQuery and afterData hooks for query modification and data transformation
  • Frontend hooks - extension system for realtime updates, analytics, and feature flags
  • Link routing - Ziggy or server-side URL resolution (configurable)
  • Multiple tables - identifier system for independent tables on the same page
  • Component columns - register reusable frontend components for custom cell rendering
  • Dark mode - all styles include dark: variants out of the box
  • Fully customisable - override any cell, header, search, pagination, or toolbar via render props. Compatible with shadcn/ui.

Installation

composer require forjedio/inertia-table
# React
npm install vendor/forjedio/inertia-table/react

# Vue
npm install vendor/forjedio/inertia-table/vue

Requirements

  • PHP 8.2+
  • Laravel 12 or 13
  • Inertia.js 2.0+
  • React 18/19 or Vue 3.4+
  • Tailwind CSS 3.4+ or 4.0+

Documentation

Full documentation is available at inertia-table.forjed.io.

Live Demo

See it in action at inertia-table-demo.forjed.io.

License

MIT

统计信息

  • 总下载量: 73
  • 月度下载量: 0
  • 日度下载量: 0
  • 收藏数: 6
  • 点击次数: 6
  • 依赖项目数: 0
  • 推荐数: 0

GitHub 信息

  • Stars: 6
  • Watchers: 0
  • Forks: 0
  • 开发语言: TypeScript

其他信息

  • 授权协议: MIT
  • 更新时间: 2026-03-24

承接程序开发

PHP开发

VUE

Vue开发

前端开发

小程序开发

公众号开发

系统定制

数据库设计

云部署

网站建设

安全加固