39 lines
735 B
PHP
39 lines
735 B
PHP
<?php
|
|
|
|
namespace app\common\services\Mews\Captcha;
|
|
|
|
use Illuminate\Routing\Controller;
|
|
|
|
/**
|
|
* Class CaptchaController
|
|
* @package Mews\Captcha
|
|
*/
|
|
class CaptchaController extends Controller
|
|
{
|
|
|
|
/**
|
|
* get CAPTCHA
|
|
*
|
|
* @param \Mews\Captcha\Captcha $captcha
|
|
* @param string $config
|
|
* @return \Intervention\Image\ImageManager->response
|
|
*/
|
|
public function getCaptcha(Captcha $captcha, $config = 'default')
|
|
{
|
|
return $captcha->create($config);
|
|
}
|
|
|
|
/**
|
|
* get CAPTCHA api
|
|
*
|
|
* @param \Mews\Captcha\Captcha $captcha
|
|
* @param string $config
|
|
* @return \Intervention\Image\ImageManager->response
|
|
*/
|
|
public function getCaptchaApi(Captcha $captcha, $config = 'default')
|
|
{
|
|
return $captcha->create($config, true);
|
|
}
|
|
|
|
}
|