jikan-rest/app/Features/CharacterFullLookupHandler.php

30 lines
689 B
PHP
Raw Normal View History

2023-01-20 20:55:43 +00:00
<?php
namespace App\Features;
use App\Dto\CharacterFullLookupCommand;
use App\Http\Resources\V4\CharacterFullResource;
use App\Support\CachedData;
2023-01-20 20:55:43 +00:00
use Illuminate\Http\JsonResponse;
use Illuminate\Http\Resources\Json\JsonResource;
use Illuminate\Support\Collection;
/**
* @extends ItemLookupHandler<CharacterFullLookupCommand, JsonResponse>
*/
final class CharacterFullLookupHandler extends ItemLookupHandler
{
protected function resource(CachedData $results): JsonResource
2023-01-20 20:55:43 +00:00
{
return new CharacterFullResource($results);
2023-01-20 20:55:43 +00:00
}
/**
* @inheritDoc
*/
public function requestClass(): string
{
return CharacterFullLookupCommand::class;
}
}