Download the PHP package rudiwer/rwtable-laravel without Composer
On this page you can find all versions of the php package rudiwer/rwtable-laravel. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Informations about the package rwtable-laravel
rudiwer/rwtable-laravel
Reusable Laravel / Inertia backend package for the RWTable Vue 3 component
RWTable is a combined package consisting of a Vue 3 table component and a server-side Laravel / Inertia action class.
The table is specifically designed for use with Vue 3 / Inertia / Laravel. The styling is based on Tailwind CSS, and a Vuetify-styled version will be available soon.
The table itself can also be used independently of Inertia and Laravel, but Excel export and chart export currently still rely fully on Inertia.
The following features are available:
- Client- or server-side data handling
- Pagination (with configurable row counts) or endless scroll
- General search field
- Column sorting
- Config menu with adjustable table height and toggleable horizontal/vertical scrolling
- Column selection and reordering for table visibility
- Resizable column widths and column reordering
- Sticky (fixed) columns
- Per-column filtering with logical expressions
- Excel export
- Chart export (based on ECharts.js)
- Custom actions menu to add your own functionality
- Multi-language support according to Laravel standards
- Inline editing
- Column layouts with chips, icons, custom date formatting, select and autocomplete fields
- Client-side and/or server-side validation during editing
- Custom actions on column / cell click and more...
This package provides:
- table data processing action (
RwTableAction) for Inertia pages, - persisted chart configurations,
- persisted excel export configurations,
- route registration,
- translation namespace loading and publish support.
Monorepo split/release blueprint:
docs/rwtable-monorepo-release-blueprint.md
Demo video
Table of Contents
- Requirements
- Installation
- Configuration
- Routes
- Request Contracts
- Controller Responses
- RwTableAction API
- Server Mode Recipes (Managed vs Manual)
- Database Schema
- Internationalization
- Security Notes
- Integration Example
- Troubleshooting
Requirements
Minimum supported versions (current package constraints)
| Layer | Minimum |
|---|---|
| PHP | 8.3 |
| Laravel | 13.0 |
inertiajs/inertia-laravel |
2.0 (stable) or 3.0 beta |
Notes:
- Laravel 10 is not supported by the current package constraints.
- Not yet tested in a project with laravel 11 / 12
- If your frontend uses RWTable Vue components, pair this package with Vue
3.4+,@inertiajs/vue3 2+, and Tailwind CSS3.2+for intended styling.
From composer.json:
| Package | Version |
|---|---|
php |
^8.3 |
illuminate/database |
^13.0 |
illuminate/http |
^13.0 |
illuminate/support |
^13.0 |
inertiajs/inertia-laravel |
^2.0 | | ^3.0@beta |
Installation
Quick Start (production install)
Use matching major/minor versions for both packages (x.y).
Frontend-specific features such as the top-right toolbar 3-dot menu payload and date/datetime display formatting are documented in:
packages/rwtable-vue/README.md
Optional: local path install (maintainers)
Add a path repository in your app composer.json:
Then require the package from that local path:
Publish resources
Run migrations:
Configuration
Published file: config/rwtable.php
Config keys
| Key | Description |
|---|---|
routes.enabled |
Enables/disables package route loading |
routes.prefix |
URI prefix for package routes |
routes.name_prefix |
Route name prefix |
routes.middleware |
Middleware stack for package routes |
field_aliases |
Safe alias map used by RwTableAction::resolveColumn() |
security.allowed_field_pattern |
Regex whitelist for user-supplied field names |
Practical full config example:
Routes
Routes are loaded from routes/web.php when routes.enabled=true.
| Method | URI | Name | Controller |
|---|---|---|---|
GET |
/rw-table-charts/{tableIdentifier} |
rw-table-charts.index |
RwTableChartController@index |
POST |
/rw-table-charts/{tableIdentifier} |
rw-table-charts.store |
RwTableChartController@store |
DELETE |
/rw-table-charts/{id} |
rw-table-charts.destroy |
RwTableChartController@destroy |
GET |
/rw-table-exports/{tableIdentifier} |
rw-table-exports.index |
RwTableExportController@index |
POST |
/rw-table-exports/{tableIdentifier} |
rw-table-exports.store |
RwTableExportController@store |
DELETE |
/rw-table-exports/{id} |
rw-table-exports.delete |
RwTableExportController@destroy |
DELETE |
/rw-table-exports/{id}/destroy |
rw-table-exports.destroy |
RwTableExportController@destroy |
All routes are user-scoped (authenticated user only).
Request Contracts
StoreRwTableExportRequest
StoreRwTableChartRequest
Core fields:
The chart request accepts both:
- builder-oriented keys (
config.builder.dataset.*,config.builder.chart.*,config.builder.presentation.*), - legacy keys (
config.xAxis,config.yAxis,config.seriesField,config.type, etc.).
Allowed chart types:
bar,line,pie,doughnut,bar3d,line3d,bar3d_webgl,line3d_webgl.
Practical chart payload (all common fields):
Practical export payload (all common fields):
Controller Responses
Charts
Exports
Validation failures return HTTP 422 with Laravel validation payload.
RwTableAction API
RwTableAction is the central reusable backend helper.
handle(Request $request, string $modelClass, string $viewComponent, array $globalFields = ['id'], int $perPageDefault = 25, array $extraProps = [], ?callable $queryCallback = null): Inertia\Response
Supports:
- global search,
- typed filtering (
text,number,date,datetime), - filter modes (
=,!=,bevat,bevat niet,>,<), - option filter modes (
option_contains,option_equals), - selection filtering (
none,exclude,only), - pagination,
- sorting,
- manual ordering mode.
Practical handle request payload (all key arrays):
Option-mode example (single/multi option filters):
update(Request $request, string $modelClass, int|string $id, array $editableFields = [], string $idKey = 'id'): JsonResponse
Supports:
validationType=modelorclient,- primary field update,
extraUpdatesarray,extraValidationRulesmap,- user-friendly localized backend messages.
Practical update payload with full arrays:
create(Request $request, string $modelClass, array $editableFields = [], array $defaults = [], string $idKey = 'id'): JsonResponse
Supports:
- model/client validation,
- defaults merge,
- manual ordering,
- optional insert-above logic with automatic rebalance.
Practical create payload with all common fields:
destroy(Request $request, string $modelClass, int|string $id, string $idKey = 'id'): JsonResponse
Deletes by id.
reindexOrdering(string $modelClass, string $orderField = 'index', string $idKey = 'id'): JsonResponse
Rebalances ordering with gap strategy (1000 increments).
Server Mode Recipes (Managed vs Manual)
Use one of the two proven backend patterns below.
Recipe A: Managed mode backend (recommended)
Use RwTableAction::handle() for data retrieval and keep controller code compact.
Client side usually uses:
managed=truedataSource(axiosorinertia)- optional infinite mode without extra parent merge logic.
Recipe B: Manual mode backend (serverSide=true)
In this setup, parent frontend handles @change and calls your endpoint. Backend returns normalized pagination payload.
Manual mode best-practice notes:
- Keep payload keys compatible with RWTable
paramMap. - For infinite scroll, frontend parent must append/merge rows when page increases.
- Backend should still return full pagination metadata (
total,current_page,last_page).
Database Schema
rw_table_charts
iduser_id(nullable FK,nullOnDelete)table_identifier(indexed)descriptionconfig(json, nullable)- timestamps
- unique:
(user_id, table_identifier, description)
rw_table_exports
iduser_id(nullable FK,nullOnDelete)table_identifier(indexed)descriptionconfig(json)- timestamps
- unique:
(user_id, table_identifier, description)
Internationalization
Translations are loaded under namespace rwtable.
In service provider:
loadTranslationsFrom(__DIR__.'/../lang', 'rwtable')
Published override path:
Shipped locales:
ennlfrde
Security Notes
Key protections built into the package:
- route-level auth middleware by default,
- user scoping for chart/export persistence,
- field-name regex whitelist via
allowed_field_pattern, - optional server alias map for safe resolved columns,
- validation type and rules enforcement in update/create actions,
firstOrFailownership checks on mutable resources.
Recommended:
- keep route middleware strict,
- always provide
editableFieldsinupdate/createwrappers, - avoid exposing unrestricted model attributes.
Integration Example
Troubleshooting
Routes not available
- check
config/rwtable.php->routes.enabled - clear caches:
php artisan optimize:clear
403 from chart/export endpoints
- ensure user is authenticated
- confirm route middleware includes
auth
422 during inline update/create
- check
validationType - ensure
validationRulesare passed for client validation - ensure model has
rules($id)for model validation path
SQL/column errors in filtering/sorting
- use
field_aliasesfor derived/related fields - ensure incoming fields satisfy
allowed_field_pattern
All versions of rwtable-laravel with dependencies
illuminate/database Version ^13.0
illuminate/http Version ^13.0
illuminate/support Version ^13.0
inertiajs/inertia-laravel Version ^2.0 || ^3.0@beta