zizou86/laravel-unifonic is a Laravel package for package to use unifonic api.
It currently has 5 GitHub stars and 17.661 downloads on Packagist (latest version v1.2).
Install it with composer require zizou86/laravel-unifonic.
Discover more Laravel packages by zizou86
or browse all Laravel packages to compare alternatives.
Last updated
Start send sms with Unifonic right away using your favorite PHP framework.
composer require zizou86/laravel-unifonic.
Add the service provider to your config/app.php:
'providers' => [
Zizou86\Unifonic\UnifonicServiceProvider::class,
],
...run php artisan vendor:publish to copy the config file.
Edit the config/unifonic.php or add Unifonic app id in your .env file
UNIFONIC_APPS_ID={YOUR_DEFAULT_APP_ID}
Add the alias to your config/app.php:
'aliases' => [
'Unifonic' => Zizou86\Unifonic\Unifonic::class,
],
Please refer to the Api Documentation for more info, or read the docblocks !
use Zizou86\Unifonic\Unifonic;
// messages API methods
Unifonic::send(int $recipient,string $message);
Unifonic::sendBulk(array $recipient, string $message);
Unifonic::getMessageIDStatus(int $messageId);
Unifonic::getBalance();
If you use many apps id, you can do this :
use Zizou86\Unifonic\Unifonic;
$sms = new App('second');
The key 'second' will be defined in your config/unifonic.php
'appsid' => [
'default' => env('UNIFONIC_APPS_ID', ''),
'second' => env('UNIFONIC_SECOND_APPS_ID', '')
],