PHP code example of osa-eg / laravel-teams-notification
1. Go to this page and download the library: Download osa-eg/laravel-teams-notification 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/ */
osa-eg / laravel-teams-notification example snippets
use Osama\LaravelTeamsNotification\TeamsNotification;
$notification = new TeamsNotification();
$message = "System Notification";
$notification->sendMessage($message);
use Osama\LaravelTeamsNotification\TeamsNotification;
$notification = new TeamsNotification();
$message = "Warning: High Memory Usage Detected";
$details = [
'Memory Usage' => '95%',
'Server' => 'Production'
];
$notification->warning()->sendMessage($message, $details);
use Osama\LaravelTeamsNotification\TeamsNotification;
try {
// Code that may throw an exception
} catch (\Exception $exception) {
$notification = new TeamsNotification();
$notification->bindTrace()->error()->sendException($exception);
}