PHP code example of laravel-notification-channels / pushbullet

1. Go to this page and download the library: Download laravel-notification-channels/pushbullet 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 / pushbullet example snippets


'pushbullet' => [
    'access_token' => env('PUSHBULLET_ACCESS_TOKEN')
]

public function routeNotificationForPushbullet()
{
    return new \NotificationChannels\Pushbullet\Targets\Email($this->email);
}

public function routeNotificationForPushbullet()
{
    return new \NotificationChannels\Pushbullet\Targets\Device($this->pushbullet_device_id);
}

public function routeNotificationForPushbullet()
{
    return new \NotificationChannels\Pushbullet\Targets\Channel($this->channel_tag);
}

public function routeNotificationForPushbullet()
{
    return new \NotificationChannels\Pushbullet\Targets\UserDevices();
}

/**
 * Get the pushbullet representation of the notification.
 *
 * @param  mixed  $notifiable
 * @return \NotificationChannels\Pushbullet\PushbulletMessage
 */
public function toPushbullet($notifiable)
{
    $url = url('/invoice/' . $this->invoice->id);

    return PushbulletMessage::create('Thank you for using our application!')
        ->link()
        ->title('One of your invoices has been paid!')
        ->url($url);
}