PHP code example of enniel / laravel-asterisk-notification-channel
1. Go to this page and download the library: Download enniel/laravel-asterisk-notification-channel 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/ */
enniel / laravel-asterisk-notification-channel example snippets
...
'providers' => [
...
NotificationChannels\Asterisk\AsteriskServiceProvider::class,
],
...
public function routeNotificationForAsterisk()
{
return '0031612345678';
}
php
use NotificationChannels\Asterisk\AsteriskChannel;
use NotificationChannels\Asterisk\AsteriskMessage;
use Illuminate\Notifications\Notification;
class ExampleNotification extends Notification
{
public function via($notifiable)
{
return [AsteriskChannel::class];
}
public function toAsterisk($notifiable)
{
return AsteriskMessage::create('message text');
}
}