tranquil-tools / laravel-table-builder
Define Laravel tables in PHP: columns, filters, search, sorting, bulk and row actions, export and reordering, independent of any frontend
Package info
github.com/ComfyCodersBV/laravel-table-builder
pkg:composer/tranquil-tools/laravel-table-builder
Requires
- php: ^8.3
- illuminate/contracts: ^11.0||^12.0||^13.0
- spatie/laravel-package-tools: ^1.16
Requires (Dev)
- kirschbaum-development/eloquent-power-joins: ^4.3
- larastan/larastan: ^3.0
- laravel/pint: ^1.14
- nunomaduro/collision: ^8.8
- orchestra/testbench: ^9.0.0||^10.0.0||^11.0.0
- pestphp/pest: ^4.0
- pestphp/pest-plugin-arch: ^4.0
- pestphp/pest-plugin-laravel: ^4.0
- phpstan/extension-installer: ^1.4
- phpstan/phpstan-deprecation-rules: ^2.0
- phpstan/phpstan-phpunit: ^2.0
- spatie/laravel-query-builder: ^7.3
Suggests
- kirschbaum-development/eloquent-power-joins: Required to enable support sorting by (nested) relationships in Tables (^4.0)
- spatie/laravel-query-builder: Build a table on a Spatie QueryBuilder for its filters and sorts (^7.0)
Provides
None
Conflicts
None
Replaces
None
README
Define Laravel tables in PHP: columns, filters, search, sorting, pagination, totals, bulk and row actions, CSV export and reordering. This package knows nothing about any frontend — it produces a JSON payload that a renderer consumes, and serves the signed bulk-action, reorder and export endpoints.
You probably want the Vue package instead
Unless you are writing a renderer, install tranquil-tools/laravel-vue-table-builder. It requires this package, so you get both:
composer require tranquil-tools/laravel-vue-table-builder
Full documentation lives at
docs.comfycoders.nl. This package ships no docs/ directory
on purpose: one documentation site, one version stream, no duplication.
What lives here
src/ |
AbstractTable, TableBuilder, QueryBuilder, components, export, the make:table command |
src/Http/, routes/ |
the signed table.bulk-action, table.reorder and table.export endpoints |
config/table-builder.php |
per page defaults, route middleware, signature lifetime, display timezone, export options |
resources/lang/ |
texts the payload carries, such as the search label and date presets |
The boundary rule: what produces the payload belongs here, what renders it belongs in a renderer.
The schema contract
TableBuilder::SCHEMA_VERSION is emitted as schemaVersion in every payload. A renderer compares it against the
version it supports. Bump the major for changes that would misrender in an older renderer, the minor for additions
that can be ignored safely.
Coming from laravel-vue-table-builder
The namespace TranquilTools\TableBuilder\ did not change, so table classes keep working. Exactly one installed
package may claim that namespace: this one.
- Configuration lives in
config/table-builder.php. A publishedconfig/vue-table-builder.phpis still read and wins over the defaults, andconfig('vue-table-builder.*')still resolves. Rename the file when convenient. - Translations live under
table-builder::;vue-table-builder::keeps resolving to the same files. Overrides published inlang/vendor/vue-table-builderkeep applying until alang/vendor/table-builderdirectory exists.
Credits
Built by ComfyCoders BV. Licensed under MIT — see LICENSE.md.