1
0
mirror of https://gitee.com/koogua/course-tencent-cloud.git synced 2025-06-23 11:58:41 +08:00
2020-09-17 21:29:29 +08:00

31 lines
654 B
PHP

<?php
namespace App\Services\Logic\Verify;
use App\Services\Logic\Service;
use App\Services\Mail\Verify as VerifyMailService;
use App\Validators\Captcha as CaptchaValidator;
use App\Validators\Verify as VerifyValidator;
class EmailCode extends Service
{
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 VerifyMailService();
$service->handle($post['email']);
}
}