PHP code example of multicaret / laravel-unifonic

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

    

multicaret / laravel-unifonic example snippets


'providers' => [
    ...
    Multicaret\Unifonic\UnifonicServiceProvider::class,
    ...
];

'aliases' => [
    ...
    'Unifonic' => Multicaret\Unifonic\UnifonicFacade::class,
    ...
],

// To test credentials and make sure the APP SID, email & password are set correctly. 
Unifonic::retrieveCredentialsForTesting();

Unifonic::send(int $recipient, string $message, string $senderID = null);
Unifonic::getMessageIDStatus(int $messageID);


Unifonic::async(true); // async calls on, default value is true
Unifonic::async(false);// async calls off

// Later you can append the callback() to be executed when the response returns.
Unifonic::async()->callback(Callable $requestCallback);