Add search to API endpoints
This commit is contained in:
parent
9fd17db103
commit
2e693067b8
4 changed files with 6 additions and 3 deletions
|
@ -69,7 +69,7 @@ class NodeController extends ApplicationApiController
|
|||
*/
|
||||
public function index(GetNodesRequest $request): array
|
||||
{
|
||||
$nodes = $this->repository->paginated(50);
|
||||
$nodes = $this->repository->setSearchTerm($request->input('search'))->paginated(50);
|
||||
|
||||
return $this->fractal->collection($nodes)
|
||||
->transformWith($this->getTransformer(NodeTransformer::class))
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue