sms.php 1.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869
  1. <?php
  2. /*
  3. * This file is part of ibrand/laravel-sms.
  4. *
  5. * (c) 果酱社区 <https://guojiang.club>
  6. *
  7. * For the full copyright and license information, please view the LICENSE
  8. * file that was distributed with this source code.
  9. */
  10. return [
  11. 'route' => [
  12. 'prefix' => 'api/sms',
  13. 'middleware' => ['api'],
  14. ],
  15. 'easy_sms' => [
  16. 'timeout' => 5.0,
  17. // 默认发送配置
  18. 'default' => [
  19. // 网关调用策略,默认:顺序调用
  20. 'strategy' => \Overtrue\EasySms\Strategies\OrderStrategy::class,
  21. // 默认可用的发送网关
  22. 'gateways' => [
  23. 'errorlog',
  24. ],
  25. ],
  26. // 可用的网关配置
  27. 'gateways' => [
  28. 'errorlog' => [
  29. 'file' => storage_path('logs/laravel-sms.log'),
  30. ],
  31. 'yunpian' => [
  32. 'api_key' => '824f0ff2f71cab52936axxxxxxxxxx',
  33. ],
  34. 'aliyun' => [
  35. 'access_key_id' => 'xxxx',
  36. 'access_key_secret' => 'xxxx',
  37. 'sign_name' => '阿里云短信测试专用',
  38. 'code_template_id' => 'SMS_802xxx',
  39. ],
  40. 'alidayu' => [
  41. //...
  42. ],
  43. ],
  44. ],
  45. 'code' => [
  46. 'length' => 5,
  47. 'validMinutes' => 5,
  48. 'maxAttempts' => 0,
  49. ],
  50. 'data' => [
  51. 'product' => '',
  52. ],
  53. 'dblog' => false,
  54. 'content' => '【iBrand】亲爱的用户,您的验证码是%s。有效期为%s分钟,请尽快验证。',
  55. 'storage' => \iBrand\Sms\Storage\CacheStorage::class,
  56. ];