Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/mediumart/orange
A laravel adapter for orange api services
https://github.com/mediumart/orange
laravel orange orange-api php sms
Last synced: 8 days ago
JSON representation
A laravel adapter for orange api services
- Host: GitHub
- URL: https://github.com/mediumart/orange
- Owner: mediumart
- License: mit
- Created: 2017-06-26T20:49:30.000Z (over 7 years ago)
- Default Branch: master
- Last Pushed: 2021-12-28T13:16:10.000Z (almost 3 years ago)
- Last Synced: 2024-06-06T10:08:45.367Z (5 months ago)
- Topics: laravel, orange, orange-api, php, sms
- Language: PHP
- Size: 81.1 KB
- Stars: 4
- Watchers: 2
- Forks: 3
- Open Issues: 0
-
Metadata Files:
- Readme: readme.md
- License: LICENSE.txt
Awesome Lists containing this project
README
# mediumart orange
[![Build Status](https://travis-ci.org/mediumart/orange.svg?branch=master)](https://travis-ci.org/mediumart/orange)
[![Coverage Status](https://coveralls.io/repos/github/mediumart/orange/badge.svg?branch=master)](https://coveralls.io/github/mediumart/orange?branch=master)
[![Latest Stable Version](https://poser.pugx.org/mediumart/orange/v/stable)](https://packagist.org/packages/mediumart/orange)
[![License](https://poser.pugx.org/mediumart/orange/license)](https://packagist.org/packages/mediumart/orange)## 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
```php
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_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:
```php
$sms = app('orange-sms');
```Or using type hinting
```php
use Mediumart\Orange\SMS\SMS;public function index(SMS $sms)
{
/.../
}
```The documentation on how to use the `$sms` client instance can be found [here](https://github.com/mediumart/orange-sms)
## License
Mediumart orange is an open-sourced software licensed under the [MIT license](https://github.com/mediumart/orange/blob/master/LICENSE.txt).