New

Just launched: Vueblocks, a brand-new search engine for Vue packages! Explore Vueblocks →

zizou86/laravel-unifonic

Package to use Unifonic API
17,691 5
Install
composer require zizou86/laravel-unifonic
Latest Version:v1.2
PHP:>=7.0.0
Laravel:5
License:MIT
Last Updated:Aug 18, 2017
Links: GitHub  ·  Packagist
Maintainer: zizou86

Laravel-Unifonic

Start send sms with Unifonic right away using your favorite PHP framework.

Installation

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,
           
],

Usage

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', '')
],

Related Packages

railken/lara-eye
38,923 38
api
juampi92/api-resources

Manage your resources maintaining API versioning

934,433 111
tailflow/laravel-orion

Orion for Laravel allows you to build a fully featured REST API based on your El...

803,682 1,592
unlu/laravel-api-query-builder

Laravel API Query Builder Package.

720,455 329
juampi92/phecks

A package to run custom PHP checks

411,123 4

Version History

Version Released PHP Laravel License
v1.2 >=7.0.0 >=5.3 MIT
v1.1 >=7.0.0 >=5.3 MIT