service-captcha/app/Http/Resources/Api/V1/CaptchaVerified.php
Leonid Nikitin 520a3ba068
Revived API POST /api/v1/captcha.
Captcha validation has been adjusted.
2023-11-26 15:09:42 +06:00

29 lines
612 B
PHP

<?php declare(strict_types=1);
namespace App\Http\Resources\Api\V1;
use App\ServiceResults\Api\V1\CaptchaService\CaptchaVerifiedResult;
use Illuminate\Http\Request;
use Illuminate\Http\Resources\Json\JsonResource;
final class CaptchaVerified extends JsonResource
{
/**
* @var CaptchaVerifiedResult
*/
public $resource;
/**
* Transform the resource into an array.
*
* @param Request $request
* @return array
*/
public function toArray(Request $request): array
{
return [
'captcha_key' => $this->resource->getKey()
];
}
}