rcx / datatables-laravel
Shared RCX Laravel DataTables UI and configuration helpers.
Requires
- php: ^8.2
- illuminate/database: ^11.0|^12.0|^13.0
- illuminate/http: ^11.0|^12.0|^13.0
- illuminate/support: ^11.0|^12.0|^13.0
- illuminate/view: ^11.0|^12.0|^13.0
- symfony/http-foundation: ^7.0|^8.0
This package is auto-updated.
Last update: 2026-08-06 21:50:57 UTC
README
Shared RCX Laravel DataTables UI helpers extracted from the fulfillment app.
This package owns reusable table infrastructure:
Rcx\DataTables\DataTableBuilderRcx\DataTables\DataTableSsp<x-rcx-datatables.table :config="$config" /><x-rcx-datatables.shared-filters ... />- DataTables initialization JS
- Shared lifecycle events and browser formatting utilities
- Safe CSV streaming for local or application-provided row sources
- Package-owned table error presentation
- Shared RCX DataTables SCSS
Applications still own their table registries, routes, datasets, SQL/API calls, and row formatting.
Toolbar Visibility
Table controls can be hidden independently through configuration:
[
'showSearch' => false,
'showTableStatus' => false,
'showColumnControls' => false,
]
showTableStatus controls both the default “Showing all…” message and the filtered-results summary bar. Read-only tables without search or filters should normally disable all three options above.
The DataTables footer controls can also be hidden independently with showPagination, showInfo, and showPageLength. All three remain enabled by default. Pagination controls are automatically hidden when every matching row fits on one page. An explicit JavaScript layout configuration takes precedence.
Search Panel Contrast
Search and filter panels on a white surface can enable searchPanelShadow. The shared filter component supports the same setting with :search-panel-shadow="true".
Row Highlighting
Tables can highlight and reveal a row by matching a raw data field:
[
'rowHighlight' => [
'field' => 'invoiceId',
'value' => request('invoice'),
],
]
Client-side tables move to the matching row's page and scroll it into view. Applications can also call window.RcxDataTables.highlightRow(dataTable, options) or import highlightRow from the JavaScript package.
Browser Requirements
The consuming application must load jQuery, DataTables 2, Bootstrap 5's JavaScript and CSS, and Bootstrap Icons before initializing the package. Pass Bootstrap's imported Tooltip constructor to initializeRcxDataTables; the package does not depend on Bootstrap's global or jQuery integrations. Load the DataTables ColReorder and FixedHeader extensions when the corresponding table options are enabled.
Date-range filters additionally require the daterangepicker jQuery plugin and the date library required by the selected daterangepicker distribution. Without that optional plugin, tables continue to initialize and date inputs remain usable as plain text controls. SweetAlert is optional; editable-cell confirmation and error messages fall back to browser dialogs.
Laravel pages that use Ajax tables or editable cells should include the standard CSRF meta element:
<meta name="csrf-token" content="{{ csrf_token() }}">
Laravel App Wiring
During local development, add this path repository to the consuming Laravel app:
"repositories": [
{
"type": "path",
"url": "../rcxdatatableslaravel",
"options": {
"symlink": true,
"versions": {
"rcx/datatables-laravel": "dev-development"
}
}
}
],
"require": {
"rcx/datatables-laravel": "dev-development"
}
The service provider is registered through Laravel package auto-discovery. Import and initialize the package JS from the installed package, then import its SCSS:
import { Tooltip } from 'bootstrap';
import { initializeRcxDataTables } from '../../vendor/rcx/datatables-laravel/resources/js/rcx-datatables';
initializeRcxDataTables({ Tooltip });
@import "../../vendor/rcx/datatables-laravel/resources/sass/rcx-datatables";
Deployment Channels
Deployed RCX applications use matching repository branches as environment channels:
| Application branch | Package branch | Composer version |
|---|---|---|
development | development | dev-development |
stage | stage | dev-stage |
production | production | dev-production |
The application build resolves the package branch through Packagist, captures its commit SHA, pins the deployment artifact's Composer requirement to that SHA, and installs the frontend tarball from the same SHA before compiling assets. A deployed application therefore changes package revisions only when that application is deployed, and its PHP and frontend package code always come from the same commit.
Promote package changes by merging development into stage, then stage into production. Git tags are optional release snapshots and are not used to select an environment channel.
Development Checks
Run the dependency-light regression suite and package validation before handing off changes:
composer test
composer validate --strict