We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
在SmsManger类下增加 //存储动态配置模板 protected $templates =[]; //配置方法 public function options($arg){ $this->templates=$arg; } //修改 protected function generateTemplates($type) {
public function options($arg){ $this->templates=$arg; }
if(count($this->templates)!=0){ //判断是否使用动态配置模板 $templates =$this->templates; } else { $templates = config('laravel-sms.templates'); }
//... } 在发送前使用,这样可选择每次发送的短信模板 $options=[ ‘Aliyun’=>'SMS_xxxxxx', ]; SmsManger::options($options);
The text was updated successfully, but these errors were encountered:
赞,感觉不应该修改原生方法,但是这个smsmanager又不提供需要的方法可以去继承。
Sorry, something went wrong.
No branches or pull requests
在SmsManger类下增加
//存储动态配置模板
protected $templates =[];
//配置方法
public function options($arg){ $this->templates=$arg; }
//修改
protected function generateTemplates($type)
{
if(count($this->templates)!=0){ //判断是否使用动态配置模板
$templates =$this->templates;
}
else
{
$templates = config('laravel-sms.templates');
}
//...
}
在发送前使用,这样可选择每次发送的短信模板
$options=[
‘Aliyun’=>'SMS_xxxxxx',
];
SmsManger::options($options);
The text was updated successfully, but these errors were encountered: