Skip to content
Icon

WARNING You're browsing the documentation for an upcoming version of Laravel DataTables. The documentation and features of this release are subject to change.

Skip Paging

To skip paging of DataTables, we can use the skipPaging API or just set paging: false in our JavaScript.


Using PHP

use Yajra\DataTables\Facades\DataTables;
use App\Models\User;
 
Route::get('user-data', function() {
$model = User::query();
 
return DataTables::eloquent($model)
->skipPaging()
->toJson();
});

Using JavaScript

$(document).ready(function() {
$('#example').DataTable({
serverSide: true,
processing: true,
ajax: '',
paging: false
});
});

Use Cases

Use Case Recommendation
Small datasets ✅ Use skip paging
Export all records ✅ Use skip paging
Large datasets ❌ Use pagination
Performance optimization ❌ Use pagination

See Also