1. Go to this page and download the library: Download smsfactor/smsfactor-laravel 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/ */
smsfactor / smsfactor-laravel example snippets
'providers' => [
// Other service providers...
SMSFactor\Laravel\SMSFactorServiceProvider::class,
],
use SMSFactor\Laravel\Facade\Account;
use SMSFactor\Laravel\Facade\Campaign;
use SMSFactor\Laravel\Facade\ContactList;
use SMSFactor\Laravel\Facade\Message;
use SMSFactor\Laravel\Facade\Webhook;
use SMSFactor\Laravel\Facade\Token;
$response = Message::send([
'to' => '33600000000',
'text' => 'Have you ever danced with the devil in the pale moonlight ?'
]);
print_r($response->getJson()); //In case you don't receive your text, printing the API response might be useful
$account = app('SMSFactor\Message');
$response = $account->send([
'to' => '33600000000',
'text' => 'Have you ever danced with the devil in the pale moonlight ?'
]);
print_r($response->getJson());
config/app.php
config/app.php
php artisan vendor:publish
config/smsfactor.php
Loading please wait ...
Before you can download the PHP files, the dependencies should be resolved. This can take some minutes. Please be patient.