jikan-rest/app/Features/PeopleSearchHandler.php
pushrbx a145f18bbd wip - major refactor
- AppServiceProvider is needs more work to wire in new services
- todo: more dtos
- todo: add unit tests
- todo: add more integration tests
2023-05-21 11:14:34 +01:00

30 lines
608 B
PHP

<?php
namespace App\Features;
use App\Dto\PeopleSearchCommand;
use App\Http\Resources\V4\PersonCollection;
use Illuminate\Contracts\Pagination\LengthAwarePaginator;
/**
* @extends SearchRequestHandler<PeopleSearchCommand, PersonCollection>
*/
class PeopleSearchHandler extends SearchRequestHandler
{
/**
* @inheritDoc
*/
public function requestClass(): string
{
return PeopleSearchCommand::class;
}
/**
* @inheritDoc
*/
protected function renderResponse(LengthAwarePaginator $paginator)
{
return new PersonCollection($paginator);
}
}