PHP code example of helliomessaging / helliomessaging-laravel-notification-channel

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

    

helliomessaging / helliomessaging-laravel-notification-channel example snippets




return [
    'config' => [
        'client_id' => env('HELLIO_CLIENT_ID'),
        'app_secret' => env('HELLIO_APP_SECRET')
    ],

];

public function routeNotificationForHellioSMS()
{
    return $this->phone; // where phone is a column in your users table;
}
bash
php artisan vendor:publish --provider="NotificationChannels\Hellio\HellioServiceProvider"
 php


use Illuminate\Notifications\Notification;
use NotificationChannels\Hellio\HellioChannel;
use NotificationChannels\Hellio\HellioMessage;

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

    public function toHellioSMS($notifiable)
    {
        return (new HellioMessage)
   ->from("HellioSMS")
   ->to("233242813656") //Add the country code to the number you wish to send to without the need to add the  +
              ->content("Welcome to Hellio Messaging, a new world of litmitless possibilities.")
              ->messageType(0); //0 = text, 1 = flash
    }
}