jikan-rest/app/Features/UserUpdatesLookupHandler.php
2023-05-21 11:18:02 +01:00

26 lines
608 B
PHP

<?php
namespace App\Features;
use App\Dto\UserUpdatesLookupCommand;
use App\Http\Resources\V4\ProfileLastUpdatesResource;
use App\Support\CachedData;
use Illuminate\Http\Resources\Json\JsonResource;
use Illuminate\Support\Collection;
/**
* @extends UserLookupHandler<UserUpdatesLookupCommand>
*/
final class UserUpdatesLookupHandler extends UserLookupHandler
{
public function requestClass(): string
{
return UserUpdatesLookupCommand::class;
}
protected function resource(CachedData $results): JsonResource
{
return new ProfileLastUpdatesResource($results);
}
}