PHP code example of colling-media / laravel-zipwhip-notification-channel

1. Go to this page and download the library: Download colling-media/laravel-zipwhip-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/ */

    

colling-media / laravel-zipwhip-notification-channel example snippets


// config/app.php
'providers' => [
    ...
    NotificationChannels\ZipWhip\ZipWhipServiceProvider::class,
],

// config/services.php
...
'zipwhip' => [
    'user'  => env('ZIPWHIP_USER'),
    'pass' => env('ZIPWHIP_PASS'),
],
...

use Illuminate\Notifications\Notification;
use NotificationChannels\ZipWhip\ZipWhipMessage;
use NotificationChannels\ZipWhip\ZipWhipChannel;

class AccountApproved extends Notification
{
    public function via($notifiable)
    {
        return [ZipWhipChannel::class];
    }

    public function toZipWhip($notifiable)
    {
        return (new ZipWhipMessage())
            ->content("Your {$notifiable->service} account was approved!");
    }
}