Skip to content

Commit a241d74

Browse files
author
rmcastro
committed
Defult Order
1 parent 8f28ff1 commit a241d74

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

src/Traits/Client.php

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,8 @@ public function order()
5757
} elseif ($this->request->has('order.column')) {
5858
$column = $this->request->input('order.column');
5959
} else {
60-
throw DatatableException::create("Property 'order.0.column' or 'order.column' not found in the request.");
60+
// throw DatatableException::create("Property 'order.0.column' or 'order.column' not found in the request.");
61+
$column = 0;
6162
}
6263

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

81-
throw DatatableException::create("Property 'order.0.dir' or 'order.dir' not found in the request.");
82+
return "asc";
83+
// throw DatatableException::create("Property 'order.0.dir' or 'order.dir' not found in the request.");
8284
}
8385

8486
/**

0 commit comments

Comments
 (0)