Revived API /api/v1/captcha.
Now a new captcha is created to check for a bot.
This commit is contained in:
@@ -23,9 +23,17 @@ final class Captcha extends JsonResource
|
||||
public function toArray(Request $request): array
|
||||
{
|
||||
return [
|
||||
'image_base64' => $this->resource->getImageBase64(),
|
||||
'image_text_base64' => $this->resource->getImageTextBase64(),
|
||||
'captcha_key' => $this->resource->getKey()
|
||||
'image_head' => [
|
||||
'base64' => $this->resource->getImageHead()->getImageBase64(),
|
||||
'width' => $this->resource->getImageHead()->getWidth(),
|
||||
'height' => $this->resource->getImageHead()->getHeight(),
|
||||
],
|
||||
'image_body' => [
|
||||
'base64' => $this->resource->getImageBody()->getImageBase64(),
|
||||
'width' => $this->resource->getImageBody()->getWidth(),
|
||||
'height' => $this->resource->getImageBody()->getHeight(),
|
||||
],
|
||||
'captcha_key' => $this->resource->getKey()
|
||||
];
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user