hardywen/phpsms-l4
toplan/phpsms for laravel 4
laravel 5 版本请使用 https://github.com/toplan/laravel-sms
#install
composer require 'hardywen/phpsms-l4' '~1.0'
#config config/app.php 两个数组加入:
providers = [
'Hardywen\PhpSms\PhpSmsServiceProvider'
]
aliases = [
'SMS'=>'Hardywen\PhpSms\Facade\Sms',
]
php artisan config:publish hardywen/phpsms-l4
#exapmle
$result = SMS::make()->to('138xxxxxxxx')->template([
'Ucpaas' => '1233',
'YunTongXun' => '1211'
])->data(['123123', 10])->content('something')->send();
if($result['success'] == true){
//发送成功,做你想做的事
}else{
//发送失败
}
更多使用方式查看原组件
Related Packages
doctrine/dbal
Powerful PHP database abstraction layer (DBAL) with many features for database s...
641,106,524
9,700
laravel/serializable-closure
Laravel Serializable Closure provides an easy and secure way to serialize closur...
418,291,778
609
nunomaduro/collision
Cli error handling for console/command-line PHP applications.
394,964,158
4,660
Version History
| Version | Released | PHP | License |
|---|---|---|---|
| 1.0 | >=5.4.0 | MIT |