laravel-notification-channels/workplace
Composer 安装命令:
composer require laravel-notification-channels/workplace
包简介
Workplace notification channel
README 文档
README
This package makes it easy to send notifications using Workplace with Laravel 5.5+ and 6.0
Contents
Installation
You can install the package via composer:
composer require laravel-notification-channels/workplace
Usage
You can now use the channel in your via() method inside the Notification class.
use NotificationChannels\Workplace\WorkplaceChannel; use NotificationChannels\Workplace\WorkplaceMessage; use Illuminate\Notifications\Notification; class WorkplaceNotification extends Notification { public function via($notifiable) { return [WorkplaceChannel::class]; } public function toWorkplace($notifiable) { return new WorkplaceMessage('# Laravel Notification Channels are awesome!'); } }
You also need to add the routeNotificationForWorkplace() method in your notifiable model:
class TestNotifiable { use \Illuminate\Notifications\Notifiable; public function routeNotificationForWorkplace() { return 'https://graph.facebook.com/<groupId>/feed?access_token=<access_token>'; } }
Available Message methods
content(''): (string) Notification message, supports markdown.asMarkdown(): Treats the message content as being Markdown (default)asPlainText(): Treats the message content as being plain text
Changelog
Please see CHANGELOG for more information what has changed recently.
Testing
$ composer test
Security
If you discover any security related issues, please email mail@goncaloqueiros.net instead of using the issue tracker.
Contributing
Please see CONTRIBUTING for details.
Credits
License
The MIT License (MIT). Please see License File for more information.
统计信息
- 总下载量: 421
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 6
- 点击次数: 2
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: MIT
- 更新时间: 2020-01-01