Skip to content

Commit

Permalink
Defult Order
Browse files Browse the repository at this point in the history
  • Loading branch information
rmcastro committed May 28, 2024
1 parent 8f28ff1 commit a241d74
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions src/Traits/Client.php
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,8 @@ public function order()
} elseif ($this->request->has('order.column')) {
$column = $this->request->input('order.column');
} else {
throw DatatableException::create("Property 'order.0.column' or 'order.column' not found in the request.");
// throw DatatableException::create("Property 'order.0.column' or 'order.column' not found in the request.");
$column = 0;
}

return $this->request->columns[$column]['data'];
Expand All @@ -78,7 +79,8 @@ public function direction()
return $this->request->input('order.dir');
}

throw DatatableException::create("Property 'order.0.dir' or 'order.dir' not found in the request.");
return "asc";
// throw DatatableException::create("Property 'order.0.dir' or 'order.dir' not found in the request.");
}

/**
Expand Down

0 comments on commit a241d74

Please sign in to comment.