jikan-rest/app/Features/MangaFullLookupHandler.php

27 lines
630 B
PHP
Raw Permalink Normal View History

2023-01-20 20:55:43 +00:00
<?php
namespace App\Features;
use App\Dto\MangaFullLookupCommand;
use App\Http\Resources\V4\MangaFullResource;
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<MangaFullLookupCommand, JsonResponse>
*/
final class MangaFullLookupHandler extends ItemLookupHandler
{
public function requestClass(): string
{
return MangaFullLookupCommand::class;
}
protected function resource(CachedData $results): JsonResource
2023-01-20 20:55:43 +00:00
{
return new MangaFullResource($results);
2023-01-20 20:55:43 +00:00
}
}