1. Go to this page and download the library: Download olusegun171/laravel-termii 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/ */
olusegun171 / laravel-termii example snippets
use LaravelTermii\Termii;
$messaging = Termii::messaging();
$channel = 'generic'; //default is 'generic' or pass 'dnd' to send dnd message
$response = $messaging->sendMessage(string $to, string $message, string $channel);
$response->json();
$channel = 'generic'; //default is 'generic' or pass 'dnd' to send dnd message
$messaging->sendBulkMessage($to, string $mesage);
//The url to the file resource and caption that should be added to the image,
$media = ['url' => '','caption' => '' ];
$device_name = 'N-Alert'; // you can pass another approved device name.
$response = $messaging->sendWhatapps(string $to, string $device_name, array $media);
$response->json();
php
$response->body() : string;
$response->json($key = null, $default = null) : mixed;
$response->object() : object;
// Returns http status code
$response->status() : int;
// Determine if the status code is >= 200 and < 300...
$response->successful();
// Determine if the status code is >= 400...
$response->failed();
// Determine if the response has a 400 level status code...
$response->clientError();
// Determine if the response has a 500 level status code...
$response->serverError();
Loading please wait ...
Before you can download the PHP files, the dependencies should be resolved. This can take some minutes. Please be patient.