ComfyCoders TranquilTools
Docs /Laravel Vue TableBuilder
Repository
v1

Installation

Requirements

  • PHP 8.2+
  • Laravel 10, 11, or 13
  • Inertia.js with Vue 3
  • Tailwind CSS v4

Composer

composer require tranquil-tools/laravel-vue-table-builder

The service provider registers automatically via Laravel's package discovery. The PHP side (table classes, endpoints, config and translations) lives in tranquil-tools/laravel-table-builder, which comes along as a dependency; this package adds the Vue component and shares the translations with Inertia.

Publish Assets

Publish translations (optional):

php artisan vendor:publish --tag="table-builder-translations"

Publish the config (optional):

php artisan vendor:publish --tag="table-builder-config"

Before 1.9 these were vue-table-builder-translations and vue-table-builder-config. A published config/vue-table-builder.php or lang/vendor/vue-table-builder keeps working, and config('vue-table-builder.*') and vue-table-builder:: keys keep resolving.

NPM Dependencies

The package ships its Vue component and UI primitives. Install peer dependencies:

npm install reka-ui @lucide/vue

The components import their icons from @lucide/vue, the maintained successor of lucide-vue-next that Laravel's starter kits ship. An app that still only has lucide-vue-next can install @lucide/vue next to it, or alias it in Vite: '@lucide/vue': 'lucide-vue-next'.

Import CSS

Import the package stylesheet in your app entry point (resources/js/app.js or resources/js/app.ts):

import '../css/app.css'

Dark Mode

Dark mode is supported out of the box. Add the dark class to your <html> element to enable it:

<html class="dark">

Modal Support (optional)

If you use ->rowModal(), the package dispatches a table-builder:open-modal DOM event on window. Listen for it wherever your modal system lives:

window.addEventListener('table-builder:open-modal', (e) => {
    openModal((e as CustomEvent).detail);
});

See Row Links & Modals for the full payload shape and contract.

Generate a Table Class

Use the Artisan command to scaffold a table class:

php artisan make:table UsersTable

This creates app/Tables/UsersTable.php with an AbstractTable stub ready to configure.