mediumart / orange
A laravel wrapper/adapter for orange api services.
Installs: 1 804
Dependents: 0
Suggesters: 0
Security: 0
Stars: 4
Watchers: 2
Forks: 3
Open Issues: 0
Requires
- php: >=7.3
- illuminate/support: ~7.0|^8.0
- mediumart/orange-sms: ~2.0
Requires (Dev)
- mockery/mockery: ^1.0
- orchestra/testbench: ^5.0|^6.0
- phpunit/phpunit: ^7.5.15 || ^8.5 || ^9.0
README
Description
A laravel wrapper/adapter for orange api services.
Installation
Using composer:
$ composer require mediumart/orange
If you are using laravel 5.3+ prior to version 5.5, add this to your config/app.php
inside the 'providers'
array
Mediumart\Orange\OrangeServiceProvider::class
SMS Api
Configuration
Open the config/services.php
and add a key for the orange>sms
service like this:
'orange' => [
'sms' => [
'client_id' => '<client_id>',
'client_secret' => '<client_secret>'
]
]
Using these credentials, a token
will be fetched and cached, and then automatically be renewed a few days before its expiration.
How to use
You can resolve an SMS
client instance from the Container
like this:
$sms = app('orange-sms');
Or using type hinting
use Mediumart\Orange\SMS\SMS; public function index(SMS $sms) { /.../ }
The documentation on how to use the $sms
client instance can be found here
License
Mediumart orange is an open-sourced software licensed under the MIT license.