admin/app/common/services/mews/captcha/src/CaptchaController.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);
}
}