1
0
mirror of https://gitee.com/koogua/course-tencent-cloud.git synced 2025-06-24 04:01:31 +08:00
2020-05-16 19:49:58 +08:00

31 lines
693 B
PHP

<?php
namespace App\Services\Frontend\Verify;
use App\Services\Frontend\Service as FrontendService;
use App\Services\Mailer\Verify as VerifyMailerService;
use App\Validators\Captcha as CaptchaValidator;
use App\Validators\Verify as VerifyValidator;
class EmailCode extends FrontendService
{
public function handle()
{
$post = $this->request->getPost();
$validator = new VerifyValidator();
$post['email'] = $validator->checkEmail($post['email']);
$validator = new CaptchaValidator();
$validator->checkCode($post['ticket'], $post['rand']);
$service = new VerifyMailerService();
$service->handle($post['email']);
}
}