PHP code example of staffkojinpro / microsoft-teams
1. Go to this page and download the library: Download staffkojinpro/microsoft-teams library. Choose the download type require.
2. Extract the ZIP file and open the index.php.
3. Add this code to the index.php.
<?php
require_once('vendor/autoload.php');
/* Start to develop here. Best regards https://php-download.com/ */
staffkojinpro / 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 Staffkojinpro\MicrosoftTeams\MicrosoftTeamsChannel;
use Staffkojinpro\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')
}