| Package Data | |
|---|---|
| Maintainer Username: | HyanCat |
| Maintainer Contact: | hyancat@live.cn (HyanCat) |
| Package Create Date: | 2015-09-13 |
| Package Last Update: | 2016-12-06 |
| Home Page: | |
| Language: | PHP |
| License: | MIT |
| Last Refreshed: | 2025-11-21 15:04:16 |
| Package Statistics | |
|---|---|
| Total Downloads: | 746 |
| Monthly Downloads: | 0 |
| Daily Downloads: | 0 |
| Total Stars: | 6 |
| Total Watchers: | 1 |
| Total Forks: | 0 |
| Total Open Issues: | 0 |
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) {
});