ymigval/laravel-model-datatable-ssp
where), sorting, and pagination out-of-the-box.ajax: { url: '/your-endpoint' } and expects JSON responses with data, recordsTotal, etc.Buttons, RowGroup) without manual integration.SELECT *) could degrade under heavy loads. Requires manual tuning (e.g., select() clauses, database indexing).hasMany, polymorphic)? If not, will you need to pre-load data or write custom queries?yajra/laravel-datatables, spatie/laravel-data-table) for feature parity or better support?GET /api/users).
User::where(...)->paginate() to User::datatable(['name', 'email']).return User::with('roles')->whereHas('roles', fn($q) => $q->where('active', true))
->datatable(['name', 'email', 'roles.name']);
created_at formatting) via closures.$.ajax({
url: '/api/users',
type: 'GET',
data: { search: { value: 'John' } } // SSP params
});
{
"draw": 1,
"recordsTotal": 100,
"recordsFiltered": 50,
"data": [...]
}
order as a column name).config/app.php.User):
Route::get('/api/users', function () {
return User::datatable(['id', 'name', 'email']);
});
select() clauses to limit fetched columns.Cache::remember).draw, columns, order).N+1 queries if relationships are eager-loaded.SELECT *).select() to limit columns:
User::select(['id', 'name', 'email'])->datatable(['name', 'email']);
cursor() for PostgreSQL).How can I help you explore Laravel packages today?