hyancat/sendcloud
sendcloud
Sendcloud for laravel 5.
安装
-
安装依赖包:
composer require hyancat/sendcloud -
项目引入:
Hyancat\Sendcloud\SendCloudServiceProvider::class -
配置文件:
php artisan vendor:publish
然后配置 SENDCLOUD_API_USER SENDCLOUD_API_KEY 等...
使用
use Hyancat\Sendcloud\SendCloudFacade as SendCloud;
- 普通发送
SendCloud::send('emails.welcome', ['name'=> '小明'], function (SendCloudMessage $message) {
$message->to(['hello@laravel.com', 'word@laravel.com'])->subject('你好!');
})->success(function ($response) {
})->failure(function ($response, $error) {
});
- 模板发送
SendCloud::sendTemplate('sendcloud_test_template', ['name'=> ['小明', '小红']], function (SendCloudMessage $message) {
$message->to(['hello@laravel.com', 'word@laravel.com'])->subject('你好!');
})->success(function ($response) {
})->failure(function ($response, $error) {
});
Related Packages
doctrine/dbal
Powerful PHP database abstraction layer (DBAL) with many features for database s...
665,354,487
9,703
laravel/serializable-closure
Laravel Serializable Closure provides an easy and secure way to serialize closur...
458,029,405
607
nunomaduro/collision
Cli error handling for console/command-line PHP applications.
424,642,029
4,662
Version History
| Version | Released | PHP | Laravel | License |
|---|---|---|---|---|
| v0.3 | >=5.4.0 | ~5.0 | MIT | |
| v0.2 | >=5.4.0 | ~5.0 | MIT | |
| v0.1 | >=5.4.0 | ~5.0 | MIT |