PHP code example of norris1z / hubtel-laravel-sms-channel

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

    

norris1z / hubtel-laravel-sms-channel example snippets


'account' => [
        'key' => env('HUBTEL_API_KEY'),
        'secret' => env('HUBTEL_API_SECRET')
]

public function routeNotificationForSMS()
{
    return $this->phone; // where phone is a cloumn in your users table;
}
bash
$ php artisan vendor:publish --provider="NotificationChannels\Hubtel\HubtelServiceProvider"
 php
use Illuminate\Notifications\Notification;
use NotificationChannels\Hubtel\HubtelChannel;
use NotificationChannels\Hubtel\HubtelMessage;

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

    public function toSMS($notifiable)
    {
        return (new HubtelMessage)
			->from("JabClari")
			->to("2331234567890")
           	 	->content("Kim Kippo... Sup with you");
    }
}