sms.php 1.1 KB

12345678910111213141516171819202122232425262728293031323334353637383940
  1. <?php
  2. /**
  3. * Created by PhpStorm.
  4. * User: MADAO
  5. * Date: 2018/3/16
  6. * Time: 20:18
  7. */
  8. return [
  9. 'init' => [
  10. // HTTP 请求的超时时间(秒)
  11. 'timeout' => 5.0,
  12. // 默认发送配置
  13. 'default' => [
  14. // 网关调用策略,默认:顺序调用
  15. 'strategy' => \Overtrue\EasySms\Strategies\OrderStrategy::class,
  16. // 默认可用的发送网关
  17. 'gateways' => [
  18. 'aliyun',
  19. ],
  20. ],
  21. // 可用的网关配置
  22. 'gateways' => [
  23. 'errorlog' => [
  24. 'file' => '/tmp/easy-sms.log',
  25. ],
  26. 'aliyun' => [
  27. 'access_key_id' => 'LTAINvaCNbO0kN9A',
  28. 'access_key_secret' => 'stvr2EocXDDKW3MZN7csi0SIuuVb6G',
  29. 'sign_name' => '引擎力',
  30. ],
  31. ],
  32. ],
  33. 'redisExpire' => 600, //短信缓存到redis时间 短信在该时间范围内是有效的
  34. 'sendTimeout' => 60, //数值>=60 手机号码每次发送超时时间
  35. 'codeSize' => 4, //验证码个数
  36. 'codeIsIncludeStr' => false, //验证码是否包含字符串
  37. ];