PHP code example of bitfumes / karix-notification-channel

1. Go to this page and download the library: Download bitfumes/karix-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/ */

    

bitfumes / karix-notification-channel example snippets


// config/services.php
...
    'karix' => [
        'id' => env('KARIX_ID'),
        'token' => env('KARIX_TOKEN'),
    ],
...

public function routeNotificationForKarix()
{
    return $this->phone;
}
 php
use Bitfumes\KarixNotificationChannel\KarixChannel;
use Bitfumes\KarixNotificationChannel\KarixMessage;
use Illuminate\Notifications\Notification;

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

    public function toKarix($notifiable)
    {
        return KarixMessage::create()
                        ->from('+1XXXXXXXXXX')
                        ->content('Your message comes here');
    }
}