Skip to content

Instantly share code, notes, and snippets.

@anthonyterrell
Last active February 18, 2016 16:29
Show Gist options
  • Save anthonyterrell/f2e16781a33a4ca10603 to your computer and use it in GitHub Desktop.
Save anthonyterrell/f2e16781a33a4ca10603 to your computer and use it in GitHub Desktop.
jQuery datatable server side column sorting. This is done in PHP, more specifically Laravel 5.2.*
if($request->get('order')[0]['column']){
$data->orderBy($request->get('columns')[$request->get('order')[0]['column']]['data'], $request->get('order')[0]['dir']);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment