PHP code example of asasem / laravel-vk-notification-channel
1. Go to this page and download the library: Download asasem/laravel-vk-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/ */
asasem / laravel-vk-notification-channel example snippets
php
use NotificationChannels\Vk\VkChannel;
use NotificationChannels\Vk\VkMessage;
use Illuminate\Notifications\Notification;
class ExampleNotification extends Notification
{
public function via($notifiable)
{
return [VkChannel::class];
}
public function toVkontakte($notifiable)
{
return (new VkMessage())
->message('message text')
->token('some_token');
}
}