<?php
require_once('vendor/autoload.php');
/* Start to develop here. Best regards https://php-download.com/ */
laravel-notification-channels / microsoft-teams example snippets
return MicrosoftTeamsMessage::create()
->to(config('services.microsoft_teams.sales_url'))
->type('success')
->title('Subscription Created')
->content('Yey, you got a **new subscription**. Maybe you want to contact him if he needs any support?')
->button('Check User', 'https://foo.bar/users/123');
use Illuminate\Notifications\Notification;
use NotificationChannels\MicrosoftTeams\MicrosoftTeamsChannel;
use NotificationChannels\MicrosoftTeams\MicrosoftTeamsMessage;
class SubscriptionCreated extends Notification
{
public function via($notifiable)
{
return [MicrosoftTeamsChannel::class];
}
public function toMicrosoftTeams($notifiable)
{
return MicrosoftTeamsMessage::create()
->to(config('services.microsoft_teams.sales_url'))
->type('success')
->title('Subscription Created')
->content('Yey, you got a **new subscription**. Maybe you want to contact him if he needs any support?')
->button('Check User', 'https://foo.bar/users/123');
}
}
public function routeNotificationForMicrosoftTeams(Notification $notification)
{
return config('services.microsoft_teams.sales_url');
}