Skip to content

Commit

Permalink
fix: add missing search method to relation controllers
Browse files Browse the repository at this point in the history
  • Loading branch information
alexzarbn committed Jun 18, 2021
1 parent 3c0cc72 commit c1d36ce
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions src/Concerns/HandlesRelationStandardOperations.php
Original file line number Diff line number Diff line change
Expand Up @@ -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.
*
Expand Down

0 comments on commit c1d36ce

Please sign in to comment.