darkjinnee / smscenter
Laravel package for interacting with SMS Center (smsc.ru)
This package has no released version yet, and little information is available.
README
Laravel package for interacting with SMS Center (smsc.ru)
Documentation
Installation
Via Composer
$ composer require darkjinnee/smscenter
Configure Laravel
In Laravel 5.5 the service provider will automatically get registered.
In older versions of the framework just add the service provider and alias in config/app.php
file:
/*Example*/ 'providers' => [ ... Darkjinnee\SMSCenter\SMSCenterServiceProvider::class, ];
/*Example*/ 'alias' => [ ... 'JSTransmit' => Darkjinnee\SMSCenter\Facades\SMSCenter::class, ];
Publish Files
Publish configuration files and views by running the following Artisan commands.
$ php artisan vendor:publish --provider="Darkjinnee\SMSCenter\SMSCenterServiceProvider"
Usage
/*Example*/ use Darkjinnee\SMSCenter\SMSCenter; public function getCode(SMSCenter $smscenter) { $codeCollect = $smscenter->sendCodePhone('+7***'); if ($codeCollect->has('errors')) { return response()->json([ 'errors' => ['sendCodePhone' => [$codeCollect['errors']]], ], 422); } return $codeCollect['code']; }
Change log
Please see the changelog for more information on what has changed recently.
Testing
$ composer test
Security
If you discover any security related issues, please email darkjinnee@gmail.com instead of using the issue tracker.
Credits
License
MIT. Please see the license file for more information.