add service dir
This commit is contained in:
21
app/Service/Api/SmsService.php
Normal file
21
app/Service/Api/SmsService.php
Normal file
@ -0,0 +1,21 @@
|
||||
<?php
|
||||
|
||||
namespace App\Service\Api;
|
||||
use App\Thrid\Sms\Movider\Movider;
|
||||
use App\Thrid\Sms\SmsInterface;
|
||||
|
||||
class SmsService
|
||||
{
|
||||
|
||||
function sendSmsCode($phone, $code): bool
|
||||
{
|
||||
return $this->getChannel()->sendSmsCode($phone, $code);
|
||||
}
|
||||
|
||||
function getChannel(): SmsInterface
|
||||
{
|
||||
return new Movider();
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
Reference in New Issue
Block a user