Skip to content

Latest commit

 

History

History
17 lines (12 loc) · 429 Bytes

order-by-nulls-last.md

File metadata and controls

17 lines (12 loc) · 429 Bytes

Order by NULLS LAST

This api will set Datatables to perform ordering with NULLS LAST option.

use Datatables;

Route::get('user-data', function() {
	$model = App\User::query();

	return Datatables::eloquent($model)
			->orderByNullsLast()
			->make(true);
});

You must update nulls_last_sql config and use a pattern that matches your DB Driver.