langleyfoxall/react-dynamic-data-table-laravel-api
Larablocks Analysis
langleyfoxall/react-dynamic-data-table-laravel-api works with Laravel 5 to 13 (latest release v5.6.1, Jul 1, 2026).
Recommendation checks
Solid choiceSolid choice: maintained and up to date, meets 2 of 4 checks; below the bar for Recommended on use.
- Works with Laravel 13, the current version
- Released in the last 12 months (Jul 1, 2026)
- 2,385 downloads a month (needs 10,000)
- 7 GitHub stars (needs 100)
State
Maintained- Last stable release: Jul 1, 2026.
- 2 releases in the last 12 months.
- First released: Nov 19, 2018.
- Monthly downloads: 2,385.
- 2 open issues on GitHub.
Data from Packagist and GitHub, checked by Larablocks on Nov 30, 2026.
| Install | |
|---|---|
composer require langleyfoxall/react-dynamic-data-table-laravel-api |
|
| Latest Version: | v5.6.1 |
| PHP: | ^7.2||^8.0 |
| Laravel: | 5 – 13 |
| License: | LGPL-3.0-only |
| Last Updated: | Jul 1, 2026 |
| Links: | GitHub · Packagist |
Laravel API for React Dynamic Data Table
This package provides a Laravel API endpoint responder for the React Dynamic Data Table component.
Installation
composer require langleyfoxall/react-dynamic-data-table-laravel-api
Usage
First, create a new route in your API routes file for the data table response, and point it to a controller.
In this controller method, create a new DataTableResponder passing it the model you wish to return data about, and the provided instance of the Request object. You can optionally specify changes to the query (such as sorting, or filtering) using the query method. If you want to alter the data before it gets returned in some way, such as changing attribute values or appending custom attributes, you can take advantage of collectionManipulator. You can also change number of records shown per page with the setPerPage method.
See the example usage below.
use App\User;
use Illuminate\Http\Request;
use LangleyFoxall\ReactDynamicDataTableLaravelApi\DataTableResponder;
class UsersController extends Controller
{
public function dataTable(Request $request)
{
return (new DataTableResponder(User::class, $request))
->query(function($query) { // Optional, default: none
$query->where('name', 'like', 'B%');
})
->collectionManipulator(function (Collection $collection) { // Optional, default: none
$collection->map(function($user) {
$user->name = title_case($user->name);
});
})
->setPerPage(10) // Optional, default: 15
->respond();
}
}
In your frontend code, you can now use the React Dynamic Data Table package's AjaxDynamicDataTable component to display a table of this data. The API route previously defined should be passed to this component as the apiUrl prop.
An example usage is shown below.
import React, { Component } from 'react';
import ReactDOM from 'react-dom';
import AjaxDynamicDataTable from "@langleyfoxall/react-dynamic-data-table/dist/AjaxDynamicDataTable";
export default class Example extends Component {
render() {
return (
<div className="container">
<AjaxDynamicDataTable apiUrl={'/api/users/data-table'}/>
</div>
);
}
}
if (document.getElementById('example')) {
ReactDOM.render(<Example />, document.getElementById('example'));
}
Without a model
Sometimes you need to create a table of data for which there is no model (and the data is some kind of aggregation, so a model would not be appropriate).
use App\User;
use Illuminate\Http\Request;
use LangleyFoxall\ReactDynamicDataTableLaravelApi\DataTableResponder;
class UsersController extends Controller
{
public function dataTable(Request $request)
{
return (new DataTableResponder(DB::table('users')->select(['id', 'name']), $request))
->query(function($query) { // Optional, default: none
$query->where('name', 'like', 'B%');
})
->collectionManipulator(function (Collection $collection) { // Optional, default: none
$collection->map(function($user) {
$user->name = title_case($user->name);
});
})
->setPerPage(10) // Optional, default: 15
->respond();
}
}
Related Packages
Powerful PHP database abstraction layer (DBAL) with many features for database s...
Laravel Serializable Closure provides an easy and secure way to serialize closur...
Cli error handling for console/command-line PHP applications.
Version History
| Version | Released | PHP | Laravel | License |
|---|---|---|---|---|
| v5.6.1 | ^7.2|| | ^5.1|| | LGPL-3.0-only | |
| v5.6.0 | ^7.2|| | ^5.1|| | LGPL-3.0-only | |
| v5.5.0 | ^7.2|| | ^5.1|| | LGPL-3.0-only | |
| v5.4.0 | ^7.2|| | ^5.1|| | LGPL-3.0-only | |
| v5.3.0 | ^7.2|| | ^5.1|| | LGPL-3.0-only | |
| v5.2.0 | ^7.2|| | ^5.1|| | LGPL-3.0-only | |
| v5.1.0 | ^7.2|| | ^5.1|| | LGPL-3.0-only | |
| v5.0.0 | ^7.2|| | ^5.1|| | LGPL-3.0-only | |
| v4.0.0 | ^7.2|| | ^5.1|| | LGPL-3.0-only | |
| v3.0.1 | ^7.2|| | ^5.1|| | LGPL-3.0-only | |
| v3.0.0 | ^7.2|| | ^5.1|| | LGPL-3.0-only | |
| v2.4.0 | ^7.0.0 | ^5.1|| | LGPL-3.0-only | |
| v2.3.0 | ^7.0.0 | ^5.1|| | LGPL-3.0-only | |
| v2.2.0 | ^7.0.0 | ^5.1|| | LGPL-3.0-only | |
| v2.1.0 | ^7.0.0 | ^5.1|| | LGPL-3.0-only | |
| v2.0.0 | ^7.0.0 | ^5.1 | LGPL-3.0-only | |
| v1.1.0 | ^7.0.0 | ^5.1 | LGPL-3.0-only | |
| v1.0.0 | ^7.0.0 | ^5.1 | LGPL-3.0-only |