PHP code example of laravel-notification-channels / sipgate
1. Go to this page and download the library: Download laravel-notification-channels/sipgate 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/ */
laravel-notification-channels / sipgate example snippets
class ExampleNotification extends Notification
{
public function via($notifiable)
{
return ['sipgate'];
}
public function toSipgate($notifiable)
{
return SipgateMessage::create('Your message goes here…');
}
}
public function toSipgate($notifiable)
{
return SipgateMessage::create('Your message goes here…')->recipient('00491234567890');
}
class User extends Authenticatable
{
use Notifiable;
public function routeNotificationForSipgate($notification)
{
return $this->phone_number;
}
}