Download the PHP package feicanfly/alisms-for-laravel without Composer
On this page you can find all versions of the php package feicanfly/alisms-for-laravel. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Please rate this library. Is it a good library?
Informations about the package alisms-for-laravel
AliSMS - For Laravel5
配置方法:
-
从终端或命令行进入您的项目目录,运行
- 将
加入config\app.php的Providers下 类似
- 运行
将配置文件发布到您的配置目录中
- 您的config目录应该增加了alisms.php配置文件
5.然后您需要在您项目的 ENV 配置文件中写入 SMS 配置 例如
此处ALISMS_SECRETKEY是指您的账户应用密码,请勿透露给他人
开始使用
-
在您需要调用短信服务的控制器中,引用SMS
-
返回执行发送的结果
参数说明
在开始使用中 send 方法一共加入了4个参数
$phone,$name,$content,$code
- $phone 指接受短信方的短信号码,
- $name 指短信签名 可以在阿里大鱼短信签名 http://www.alidayu.com/admin/service/sign 找到
- $content 是指短信模板中的变量内容.举个例子
在自己的阿里大鱼模板里面有下面一个短信模板
那么里面存在着2个变量需要替换,一个是${code} ,一个是${product}
那么对应的我们的$content 就应该为
- $code 指在阿里云中的模板ID,上面的例子中使用了一个身份验证模板,那$code 应该填写
SMS_3910275
- 到这里应该没有问题了,开始发送短信吧~ ^_^
By:秋綾
如果你在使用短信服务时遇到程序上的问题,可以加 发送邮件[email protected]到
All versions of alisms-for-laravel with dependencies
PHP Build Version
Package Version
Requires
php Version
>=5.5.0
The package feicanfly/alisms-for-laravel contains the following files
Loading the files please wait ....