PHP code example of quadrogod / laravel-mobizon

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

    

quadrogod / laravel-mobizon example snippets


// config/services.php
...
'mobizon' => [
    'domain' => '', 
    'secret' => '',
    'alphaname' => null,
],

use Illuminate\Notifications\Notification;
use Quadrogod\LaravelMobizon\MobizonChannel;
use Quadrogod\LaravelMobizon\MobizonMessage;

public function via($notifiable)
{
    return [MobizonChannel::class];
}

public function toMobizon($notifiable)
{
    return MobizonMessage::create("Your SMS message");
}

public function routeNotificationForMobizon()
{
    //Phone number without symbols or spaces
    return $this->phone_number;
}