1. Go to this page and download the library: Download ihabrouk/messenger 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/ */
ihabrouk / messenger example snippets
use Ihabrouk\Messenger\Facades\Messenger;
// Send a simple SMS
Messenger::send([
'recipient_phone' => '+1234567890',
'content' => 'Hello, this is a test message!',
'provider' => 'smsmisr', // optional
'channel' => 'sms' // optional
]);
// Send using templates
Messenger::sendFromTemplate('welcome_user', [
'recipient_phone' => '+1234567890',
'variables' => [
'user_name' => 'John Doe',
'company' => 'Acme Corp'
]
]);
use Ihabrouk\Messenger\Actions\SendMessageAction;
// In your table actions
SendMessageAction::make()
->phoneField('phone_number')
->nameField('full_name')