laravel-notification-channels/workplace is a Laravel package for workplace notification channel.
It currently has 6 GitHub stars and 421 downloads on Packagist (latest version 0.0.1).
Install it with composer require laravel-notification-channels/workplace.
Discover more Laravel packages by laravel-notification-channels
or browse all Laravel packages to compare alternatives.
Last updated
This package makes it easy to send notifications using Workplace with Laravel 5.5+ and 6.0
You can install the package via composer:
composer require laravel-notification-channels/workplace
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>';
}
}
content(''): (string) Notification message, supports markdown.asMarkdown(): Treats the message content as being Markdown (default)asPlainText(): Treats the message content as being plain textPlease see CHANGELOG for more information what has changed recently.
$ composer test
If you discover any security related issues, please email [email protected] instead of using the issue tracker.
Please see CONTRIBUTING for details.
The MIT License (MIT). Please see License File for more information.