Skip to content

Commit 47c8863

Browse files
authored
revert index method signature (#643)
* fix: revert index method signature * fix: revert input vs query for filtering
1 parent c80175c commit 47c8863

File tree

2 files changed

+3
-7
lines changed

2 files changed

+3
-7
lines changed

src/Filters/MatchesCollection.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -66,8 +66,8 @@ public function inQuery(RestifyRequest $request): self
6666
}
6767
}
6868

69-
return ! is_null($request->input("-{$filter->column()}"))
70-
|| ! is_null($request->input($filter->column()));
69+
return ! is_null($request->query("-{$filter->column()}"))
70+
|| ! is_null($request->query($filter->column()));
7171
});
7272
}
7373

src/Repositories/Repository.php

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -532,7 +532,7 @@ public function resolveIndexRelationships($request)
532532
return $this->resolveRelationships($request);
533533
}
534534

535-
public function index(RestifyRequest $request, bool $toArray = false)
535+
public function index(RestifyRequest $request)
536536
{
537537
// Check if the user has the policy allowRestify
538538

@@ -588,10 +588,6 @@ public function index(RestifyRequest $request, bool $toArray = false)
588588
'data' => $data,
589589
]);
590590

591-
if ($toArray) {
592-
return $result;
593-
}
594-
595591
return response()->json($result);
596592
}
597593

0 commit comments

Comments
 (0)