You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
21 lines
498 B
PHTML
21 lines
498 B
PHTML
|
10 years ago
|
<?php
|
||
|
|
|
||
|
|
|
||
|
|
namespace App\Controllers;
|
||
|
|
|
||
|
|
use Gregwar\Captcha\CaptchaBuilder;
|
||
|
|
|
||
|
|
class ResController
|
||
|
|
{
|
||
|
|
public function captcha($request, $response, $args)
|
||
|
|
{
|
||
|
|
$id = $args['id'];
|
||
|
|
$builder = new CaptchaBuilder;
|
||
|
|
$builder->build();
|
||
|
|
//$builder->getPhrase();
|
||
|
|
$newResponse = $response->withHeader('Content-type', ' image/jpeg');//->getBody()->write($builder->output());
|
||
|
|
$newResponse->getBody()->write($builder->output());
|
||
|
|
return $newResponse;
|
||
|
|
}
|
||
|
|
}
|