mirror of
https://gitee.com/koogua/course-tencent-cloud.git
synced 2025-07-20 15:06:39 +08:00
29 lines
508 B
PHP
29 lines
508 B
PHP
<?php
|
|
|
|
namespace App\Services\Smser;
|
|
|
|
use App\Services\Smser;
|
|
use App\Services\Verification;
|
|
|
|
class Verify extends Smser
|
|
{
|
|
|
|
protected $templateCode = 'verify';
|
|
|
|
public function handle($phone)
|
|
{
|
|
$verifyCode = new Verification();
|
|
|
|
$minutes = 5;
|
|
|
|
$code = $verifyCode->getSmsCode($phone, 60 * $minutes);
|
|
|
|
$templateId = $this->getTemplateId($this->templateCode);
|
|
|
|
$params = [$code, $minutes];
|
|
|
|
return $this->send($phone, $templateId, $params);
|
|
}
|
|
|
|
}
|