Skip to content

Latest commit

 

History

History
15 lines (11 loc) · 295 Bytes

whitelist.md

File metadata and controls

15 lines (11 loc) · 295 Bytes

White listing columns

Sorting and searching will only work on columns explicitly defined as whitelist.

use Datatables;

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

	return Datatables::eloquent($model)
				->whitelist(['name', 'email'])
				->make(true);
});