roobieboobieee/laravel-notifications-microsoft-teams

1.1.1 2019-11-13 08:05 UTC

This package is auto-updated.

Last update: 2020-09-15 16:00:42 UTC


README

Latest Version on Packagist Software License Total Downloads

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.