jikan-rest/app/Features/ProducerSearchHandler.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
625 B
PHP

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