mirror of
https://github.com/jikan-me/jikan-rest.git
synced 2025-02-20 11:23:35 +08:00
27 lines
583 B
PHP
27 lines
583 B
PHP
|
<?php
|
||
|
|
||
|
namespace App\Features;
|
||
|
|
||
|
use App\Dto\AnimeSearchCommand;
|
||
|
use App\Http\Resources\V4\AnimeCollection;
|
||
|
use Illuminate\Contracts\Pagination\LengthAwarePaginator;
|
||
|
|
||
|
/**
|
||
|
* @extends SearchRequestHandler<AnimeSearchCommand, AnimeCollection>
|
||
|
*/
|
||
|
class AnimeSearchHandler extends SearchRequestHandler
|
||
|
{
|
||
|
/**
|
||
|
* @inheritDoc
|
||
|
*/
|
||
|
public function requestClass(): string
|
||
|
{
|
||
|
return AnimeSearchCommand::class;
|
||
|
}
|
||
|
|
||
|
protected function renderResponse(LengthAwarePaginator $paginator): AnimeCollection
|
||
|
{
|
||
|
return new AnimeCollection($paginator);
|
||
|
}
|
||
|
}
|