Skip Total Records
[!WARNING] This feature is deprecated in v10. Use
setTotalRecordsinstead.
Skip total records aims to improve DataTables response time by skipping the total records count query and setting its value equals to the filtered total records.
Example
use Yajra\DataTables\Facades\DataTables;use App\Models\User; Route::get('user-data', function() { $model = User::query(); return DataTables::eloquent($model) ->skipTotalRecords() ->toJson();});
See Also
- Set Total Records - Manually set total records
- Set Filtered Records - Manually set filtered records