PHP code example of frolax / ultimate-sms-notification-channel

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

    

frolax / ultimate-sms-notification-channel example snippets


use UltimateSmsNotificationChannel\UltimateSmsMessage;

public function via($notifiable)
{
    return ['ultimate_sms'];
}

public function toUltimateSms($notifiable)
{
    return (new UltimateSmsMessage())
        ->content('This is a test message');
}

use Illuminate\Support\Facades\Notification;
use App\Notifications\YourNotification;

Notification::route('ultimate_sms', '31612345678')->notify(new YourNotification());

UltimateSmsMessage::create('This is a test message')
    ->to('31612345678,880172145789');

use UltimateSmsNotificationChannel\Facades\UltimateSms;

UltimateSms::send([
    'recipient' => '+8801322635808',
    'message' => 'Hello',
    'sender_id' => 'HaQuick',
    'type' => 'plain',
]);
bash
php artisan vendor:publish --provider="UltimateSmsNotificationChannel\\UltimateSmsServiceProvider" --tag=config