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