Skip to content

Commit 34bdc13

Browse files
committed
Fix the bug when you haven't the order_by parameter
1 parent 1de5f87 commit 34bdc13

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/CollectionHandler.php

+2-2
Original file line numberDiff line numberDiff line change
@@ -45,10 +45,10 @@ class CollectionHandler
4545

4646
public function __construct(Collection $collection, Request $request)
4747
{
48-
$this->orderBy = config('laravel-api-query-handler.orderBy', [
48+
$this->orderBy = config('laravel-api-query-handler.orderBy', [0 => [
4949
'column' => 'id',
5050
'direction' => 'asc'
51-
]);
51+
]]);
5252

5353
$this->perPage = config('laravel-api-query-handler.perPage', 9);
5454

0 commit comments

Comments
 (0)