mirror of
https://github.com/MrUnknownDE/panel.git
synced 2026-04-18 06:13:45 +02:00
Add search to API endpoints
This commit is contained in:
@@ -67,7 +67,7 @@ class LocationController extends ApplicationApiController
|
||||
*/
|
||||
public function index(GetLocationsRequest $request): array
|
||||
{
|
||||
$locations = $this->repository->paginated(100);
|
||||
$locations = $this->repository->setSearchTerm($request->input('search'))->paginated(50);
|
||||
|
||||
return $this->fractal->collection($locations)
|
||||
->transformWith($this->getTransformer(LocationTransformer::class))
|
||||
|
||||
Reference in New Issue
Block a user