PHP code example of kineticamobile / lubichannel

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

    

kineticamobile / lubichannel example snippets


// config/ubicual.php
...
return [
    'api_token' => env('UBICUAL_API_TOKEN'),
    'from' => env('UBICUAL_FROM', 'Ubicual'),
    'base_url' => env('UBICUAL_BASE_URL', 'https://api.ubicual.com/api/v1/sms/send'),
];

...

use Illuminate\Notifications\Notification;
use Kineticamobile\Ubicual\UbicualMessage;

class AccountApproved extends Notification
{
    public function via($notifiable)
    {
        return ["ubicual"];
    }

    public function toUbicual($notifiable)
    {
        return (new UbicualMessage)->content("Your account was approved!");
    }
}

public function routeNotificationForUbicual()
{
    return $this->phone_number;
}

Notification::route('ubicual', '5555555555')
            ->notify(new InvoicePaid($invoice));