laravel-notifications-microsoft-teams maintained by roobieboobieee
Author
Last update
2021/02/17 15:02
(dev-master)
License
Downloads
661
This package makes it easy to send notifications using Teams with Laravel 5.5+ and 6.0
Contents
Installation
You can install the package via composer:
composer require roobieboobieee/laravel-notifications-microsoft-teams
Next, you must load the service provider:
// config/app.php
'providers' => [
// ...
RoobieBoobieee\Teams\TeamsServiceProvider::class,
],
In every model you wish to be notifiable via Teams, you must add routeNotificationForTeams method:
// config/services.php
// ...
public function routeNotificationForTeams()
{
return $this->webhook;
}
Usage
Implement a toTeams method in your Notification that returns a Message object.
public function toTeams($notifiable)
{
$message = new Message('Example message');
$section = new Section();
$section->activityTitle('Example title');
$message->add($section);
return $message;
}
ToDo
- Implement
potentialAction
Changelog
Please see CHANGELOG for more information what has changed recently.
Security
If you discover any security related issues, please email robvankeilegom@gmail.com 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.