get data orderd by laravel code example
Example 1: laravel order by
$users = DB::table('users')
-> orderBy('name', 'desc')
-> get();
Example 2: order by in datatable laravel
$('#datatable').DataTable({
"order": [[ 2, "asc" ]] // Order on init. # is the column, starting at 0
});