2023-01-21 01:53:37 +00:00
|
|
|
<?php
|
|
|
|
|
|
|
|
namespace App\Features;
|
|
|
|
|
|
|
|
use App\Dto\PersonFullLookupCommand;
|
|
|
|
use App\Http\Resources\V4\PersonFullResource;
|
2023-02-11 16:32:16 +00:00
|
|
|
use App\Support\CachedData;
|
2023-01-21 01:53:37 +00:00
|
|
|
use Illuminate\Http\JsonResponse;
|
|
|
|
use Illuminate\Http\Resources\Json\JsonResource;
|
|
|
|
use Illuminate\Support\Collection;
|
|
|
|
|
|
|
|
/**
|
|
|
|
* @extends ItemLookupHandler<PersonFullLookupCommand, JsonResponse>
|
|
|
|
*/
|
|
|
|
final class PersonFullLookupHandler extends ItemLookupHandler
|
|
|
|
{
|
|
|
|
public function requestClass(): string
|
|
|
|
{
|
|
|
|
return PersonFullLookupCommand::class;
|
|
|
|
}
|
|
|
|
|
2023-02-11 16:32:16 +00:00
|
|
|
protected function resource(CachedData $results): JsonResource
|
2023-01-21 01:53:37 +00:00
|
|
|
{
|
2023-02-11 16:32:16 +00:00
|
|
|
return new PersonFullResource($results);
|
2023-01-21 01:53:37 +00:00
|
|
|
}
|
|
|
|
}
|