2017 © Pedro Peláez
 

library devinosms

SMS provider for devinotele.com

image

sukhanov/devinosms

SMS provider for devinotele.com

  • Wednesday, December 13, 2017
  • by extremo
  • Repository
  • 0 Watchers
  • 0 Stars
  • 27 Installations
  • 0 Dependents
  • 0 Suggesters
  • 0 Forks
  • 0 Open issues
  • 6 Versions
  • 23 % Grown

The README.md

Devinosms

Current package provides SMS sending via API devinotele.com. This package can be used in Laravel 5.4 or higher with PHP 5.6 or higher., (*1)

Installation

You can install the package via composer:, (*2)

> composer require sukhanov/devinosms

Laravel

Register DevinoSmsServiceProvider in config/app.php, (*3)

    /*
    |--------------------------------------------------------------------------
    | Autoloaded Service Providers
    |--------------------------------------------------------------------------
    |
    | The service providers listed here will be automatically loaded on the
    | request to your application. Feel free to add your own services to
    | this array to grant expanded functionality to your applications.
    |
    */

    'providers' => [


        ...

        \Sukhanov\Devinosms\DevinoSmsServiceProvider::class,

    ],

Lumen

Register DevinoSmsServiceProvider in bootstrap/app.php, (*4)

$app->register(\Sukhanov\Devinosms\DevinoSmsServiceProvider::class);

Configuration

Laravel

In order to publish configuration file execute the command below, (*5)


> php artisan vendor:publish --provider="Sukhanov\Devinosms\DevinoSmsServiceProvider"

Lumen

Please copy configuration file manually in case you did't setup artisan commands for Lumen. It's located in vendor/sukhanov/devinosms/src/config/devino.php., (*6)

Config sample

Edit configuration file with your authorisation data, (*7)

<?php
/**
 * The config file provides authorisation data
 * for devino SMS gate
*/

return [
    // Login and pass to obtain session id
    'login' => 'test',
    'password'  => 'test',

    // Addres from which to send sms
    'source_address' => 'Sender',

    // Platform to which we have to make rest requests
    'rest_platform' => 'https://integrationapi.net/rest',
];

Usage


<?php namespace App\Http\Controllers; use Sukhanov\Devinosms\Sms; class SomeController extends Controller { public function index() { // Sending a message via 'send' method to one recipient Sms::send('+79000000000', 'laravel test'); // Sending a message to a list of recipients // Note: please make sure that list od phone numbers is corrent and all items are valid phone numbers Sms::multiSend(['+79000000000','+79000000001'], 'laravel test'); } }

Responses examples

In case of any problems response will look like, (*8)


{"Code":4,"Desc":"Invalid user login or password"}

In case if SMS was sent we will get "Code":200, (*9)


{"Code":200,"Desc":"SMS was sent successfully!"}

The Versions

13/12 2017

dev-master

9999999-dev https://bitbucket.org/sukhanov/devinosms

SMS provider for devinotele.com

  Sources   Download

MIT

The Requires

 

by Sergey Ukhanov

13/12 2017

1.0.4

1.0.4.0 https://bitbucket.org/sukhanov/devinosms

SMS provider for devinotele.com

  Sources   Download

MIT

The Requires

 

by Sergey Ukhanov

19/09 2017

1.0.3

1.0.3.0 https://bitbucket.org/sukhanov/devinosms

SMS provider for devinotele.com

  Sources   Download

MIT

The Requires

 

by Sergey Ukhanov

19/09 2017

1.0.2

1.0.2.0 https://bitbucket.org/sukhanov/devinosms

SMS provider for devinotele.com

  Sources   Download

MIT

The Requires

 

by Sergey Ukhanov

19/09 2017

1.0.1

1.0.1.0 https://bitbucket.org/sukhanov/devinosms

SMS provider for devinotele.com

  Sources   Download

MIT

The Requires

 

by Sergey Ukhanov

19/09 2017

1.0.0

1.0.0.0 https://bitbucket.org/sukhanov/devinosms

SMS provider for devinotele.com

  Sources   Download

MIT

The Requires

 

by Sergey Ukhanov