jikan-rest/app/Features/ClubStaffLookupHandler.php

30 lines
665 B
PHP
Raw Normal View History

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