Revived API POST /api/v1/captcha.
Captcha validation has been adjusted.
This commit is contained in:
28
app/Http/Resources/Api/V1/CaptchaVerified.php
Normal file
28
app/Http/Resources/Api/V1/CaptchaVerified.php
Normal file
@@ -0,0 +1,28 @@
|
||||
<?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()
|
||||
];
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user