SmsService.php 1.5 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162
  1. <?php
  2. // +----------------------------------------------------------------------
  3. // | LARAVEL8.0 框架 [ LARAVEL ][ RXThinkCMF ]
  4. // +----------------------------------------------------------------------
  5. // | 版权所有 2017~2021 LARAVEL研发中心
  6. // +----------------------------------------------------------------------
  7. // | 官方网站: http://www.laravel.cn
  8. // +----------------------------------------------------------------------
  9. // | Author: laravel开发员 <laravel.qq.com>
  10. // +----------------------------------------------------------------------
  11. namespace App\Services;
  12. use App\Models\ConfigModel;
  13. /**
  14. * 手机短信管理-服务类
  15. * @author
  16. * @since 2020/11/11
  17. * Class SmsService
  18. * @package App\Services
  19. */
  20. class SmsService extends BaseService
  21. {
  22. // 静态对象
  23. protected static $instance = null;
  24. /**
  25. * 静态入口
  26. * @return static|null
  27. */
  28. public static function make()
  29. {
  30. if(!self::$instance){
  31. self::$instance = (new static());
  32. }
  33. return self::$instance;
  34. }
  35. /**
  36. * 发送手机短信
  37. * @param $email
  38. * @param string $scene 场景:默认reg-注册
  39. * @return bool
  40. */
  41. public function sendCode($mobile, $scene='reg')
  42. {
  43. return true;
  44. }
  45. /**
  46. * 验证手机短信
  47. * @param $mobile
  48. * @param $code
  49. * @param string $scene 场景:默认reg-注册
  50. * @return bool
  51. */
  52. public function check($mobile, $code, $scene='reg')
  53. {
  54. return true;
  55. }
  56. }