2023-01-15 15:49:33 +00:00
|
|
|
<?php
|
|
|
|
|
|
|
|
namespace App\Features;
|
|
|
|
|
2023-01-20 20:55:43 +00:00
|
|
|
use App\Dto\ClubStaffLookupCommand;
|
2023-02-11 16:32:16 +00:00
|
|
|
use App\Support\CachedData;
|
2023-01-15 15:49:33 +00:00
|
|
|
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-15 15:49:33 +00:00
|
|
|
|
|
|
|
/**
|
2023-01-20 20:55:43 +00:00
|
|
|
* @extends ItemLookupHandler<ClubStaffLookupCommand, JsonResponse>
|
2023-01-15 15:49:33 +00:00
|
|
|
*/
|
2023-01-20 20:55:43 +00:00
|
|
|
final class ClubStaffLookupHandler extends ItemLookupHandler
|
2023-01-15 15:49:33 +00:00
|
|
|
{
|
2023-02-11 16:32:16 +00:00
|
|
|
protected function resource(CachedData $results): JsonResource
|
2023-01-15 15:49:33 +00:00
|
|
|
{
|
2023-02-11 16:32:16 +00:00
|
|
|
return new ClubStaffResource($results);
|
2023-01-15 15:49:33 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
/**
|
|
|
|
* @inheritDoc
|
|
|
|
*/
|
|
|
|
public function requestClass(): string
|
|
|
|
{
|
2023-01-20 20:55:43 +00:00
|
|
|
return ClubStaffLookupCommand::class;
|
2023-01-15 15:49:33 +00:00
|
|
|
}
|
|
|
|
}
|