From c1d36cec5e51cd285022f9ac63b8265f24fd3ee9 Mon Sep 17 00:00:00 2001 From: Aleksei Zarubin Date: Fri, 18 Jun 2021 08:36:57 +0500 Subject: [PATCH] fix: add missing search method to relation controllers --- src/Concerns/HandlesRelationStandardOperations.php | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/src/Concerns/HandlesRelationStandardOperations.php b/src/Concerns/HandlesRelationStandardOperations.php index a5157a7d..4189bd35 100644 --- a/src/Concerns/HandlesRelationStandardOperations.php +++ b/src/Concerns/HandlesRelationStandardOperations.php @@ -210,6 +210,18 @@ protected function afterIndex(Request $request, Model $parentEntity, $entities) return null; } + /** + * Filters, sorts, and fetches the list of resources. + * + * @param Request $request + * @param $parentKey + * @return CollectionResource + */ + public function search(Request $request, $parentKey) + { + return $this->index($request, $parentKey); + } + /** * Create new relation resource. *