mohamedelshazlyeida / laravel-unifonic
Package to use Unifonic API
Installs: 2
Dependents: 0
Suggesters: 0
Security: 0
Stars: 0
Watchers: 1
Forks: 0
Open Issues: 0
pkg:composer/mohamedelshazlyeida/laravel-unifonic
Requires
- php: >=5.5.9
- ext-curl: *
- laravel/framework: >=5.0
This package is not auto-updated.
Last update: 2025-12-31 08:48:06 UTC
README
Start send sms with Unifonic right away using your favorite PHP framework.
Installation
composer require mohamedelshazlyeida/laravel-unifonic.
Add the service provider to your config/app.php:
'providers' => [
MohamedElshazlyEida\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' => MohamedElshazlyEida\Unifonic\Unifonic::class,
],
Usage
Please refer to the Api Documentation for more info, or read the docblocks !
use MohamedElshazlyEida\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 MohamedElshazlyEida\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', '')
],