first commit

This commit is contained in:
Ariyutta
2026-08-07 10:47:09 +07:00
commit 1c094fbe7f
11630 changed files with 1580900 additions and 0 deletions
+43
View File
@@ -0,0 +1,43 @@
<?php
namespace Mews\Captcha;
use Exception;
use Illuminate\Routing\Controller;
/**
* Class CaptchaController
* @package Mews\Captcha
*/
class CaptchaController extends Controller
{
/**
* get CAPTCHA
*
* @param Captcha $captcha
* @param string $config
* @return array|mixed
* @throws Exception
*/
public function getCaptcha(Captcha $captcha, string $config = 'default')
{
if (ob_get_contents()) {
ob_clean();
}
return $captcha->create($config);
}
/**
* get CAPTCHA api
*
* @param Captcha $captcha
* @param string $config
* @return array|mixed
* @throws Exception
*/
public function getCaptchaApi(Captcha $captcha, string $config = 'default')
{
return $captcha->create($config, true);
}
}