1. Go to this page and download the library: Download falcongateway/notify 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/ */
falcongateway / notify example snippets
use FalconGateway\Notify\FalconClient;
use FalconGateway\Notify\Channels\SMS;
use FalconGateway\Notify\Channels\Email;
$client = new FalconClient('your-platform-token');
// Send SMS
$result = $client->send(new SMS('Hello!'), ['+255712345678']);
// Send Email
$result = $client->send(new Email('Subject', 'Body text'), ['[email protected]']);
echo $result->message; // "Dispatched successfully."
new SMS('Your OTP is 1234')
(new Email('Subject', 'Plain text body'))
->html('<b>HTML body</b>')
->fromName('Falcon')
->fromEmail('[email protected]')
->replyTo('[email protected]')
->attachment(file_get_contents('invoice.pdf'), 'invoice.pdf')
(new Push('Title', 'Body'))
->data(['order_id' => '123'])
->imageUrl('https://example.com/image.png')
// Text message
new WhatsApp('Hello from Falcon!')
// Template message
(new WhatsApp(''))->template('otp_v1', ['1234', '5'])
(new Matrix('Alert: server down'))
->html('<b>Alert:</b> server down')