Package Data | |
---|---|
Maintainer Username: | Latrell |
Maintainer Contact: | i@latrell.me (Latrell Chan) |
Package Create Date: | 2016-04-25 |
Package Last Update: | 2016-08-18 |
Language: | PHP |
License: | MIT |
Last Refreshed: | 2024-12-19 03:22:53 |
Package Statistics | |
---|---|
Total Downloads: | 15 |
Monthly Downloads: | 0 |
Daily Downloads: | 0 |
Total Stars: | 10 |
Total Watchers: | 4 |
Total Forks: | 10 |
Total Open Issues: | 1 |
使用阿里云消息服务(MNS )作为Laravel5队列驱动。
打开 composer.json
找到或创建 repositories
键,添加资源库。
// ...
"repositories": [
// ...
{
"type": "package",
"package": {
"name": "aliyun/mns",
"version": "1.2.2",
"dist": {
"url": "https://docs-aliyun.cn-hangzhou.oss.aliyun-inc.com/cn/mns/0.0.53/assets/sdks/aliyun-mns-php-sdk-1.2.2.zip",
"type": "zip"
}
}
}
],
// ...
添加依赖包。
composer require latrell/aliyun-mns-laravel dev-master
找到 config/app.php
配置文件中,key为 providers
的数组,在数组中添加服务提供者。
'providers' => [
// ...
Latrell\AliyunMns\MnsServiceProvider::class,
]
打开队列配置文件 config/queue.php
,修改驱动为 mns
。
服务地地址参考:https://help.aliyun.com/document_detail/mns/api_reference/invoke/request.html?spm=5176.docmns/introduction/concepts.6.150.uNuU4m
'connections' => [
// ...
'mns' => [
'driver' => 'mns',
'access_id' => 'your-access-key-id',
'access_key' => 'your-access-key-secret',
'security_token' => 'your-security-token',
'end_point' => 'http(s)://{AccountId}.mns.cn-hangzhou.aliyuncs.com',
'queue' => 'your-queue-name'
],
],