|
| 1 | +<p align="center"> |
| 2 | +<img src="https://user-images.githubusercontent.com/883989/49755957-17ec0980-fcc2-11e8-9e04-0339714f979b.png"> |
| 3 | +</p> |
| 4 | + |
| 5 | +<h6 align="center"> |
| 6 | + Laravel 5.7 integration for <a href='https://github.com/glorand/drip'>Drip PHP</a> package |
| 7 | +</h6> |
| 8 | + |
| 9 | +The package requires PHP 7.1.3+ and follows the FIG standards PSR-1, PSR-2 and PSR-4 |
| 10 | +to ensure a high level of interoperability between shared PHP. |
| 11 | + |
| 12 | +Bug reports, feature requests, and pull requests can be submitted by following our [Contribution Guide](CONTRIBUTING.md). |
| 13 | + |
| 14 | +## Documentation |
| 15 | +Documentation for Drip PHP package can be found [here](https://github.com/glorand/drip/blob/1.0.4/README.md). |
| 16 | + |
| 17 | +## Installation <a name="installation"></a> |
| 18 | +``` |
| 19 | +$ composer require glorand/laravel-drip |
| 20 | +``` |
| 21 | + |
| 22 | +``` |
| 23 | +{ |
| 24 | + "require": { |
| 25 | + "glorand/laravel-drip": "^1.0" |
| 26 | + } |
| 27 | +} |
| 28 | +``` |
| 29 | + |
| 30 | +## Set the Service Provider and Facade alias |
| 31 | +After installing the package, open your Laravel config file located at ``config/app.php`` and add the following lines. |
| 32 | + |
| 33 | +In the $providers array add the following service provider for this package. |
| 34 | +```php |
| 35 | +\Glorand\Drip\Laravel\DripServiceProvider::class, |
| 36 | +``` |
| 37 | + |
| 38 | +In the $aliases array add the following facade for this package. |
| 39 | +```php |
| 40 | +'Drip' => Glorand\Drip\Laravel\DripFacade::class, |
| 41 | +``` |
| 42 | + |
| 43 | +## Config - Environment variables |
| 44 | +Update your **.env** file |
| 45 | +```dotenv |
| 46 | +DRIP_ACCOUNT_ID=your-account_id |
| 47 | +DRIP_API_KEY=your-api-key |
| 48 | +DRIP_USER_AGENT=custom-agent |
| 49 | +``` |
| 50 | + |
| 51 | +## Usage |
| 52 | +For usage, please refer to the Drip PHP package documentation, located [here](https://github.com/glorand/drip). |
| 53 | + |
| 54 | +### Contract |
| 55 | +Use **``namespace Glorand\Drip\Laravel\DripContract``** in your controller or service constructor |
| 56 | + |
| 57 | +### Facade |
| 58 | +Just use the Laravel facade alias **``Drip::``** instead of the native call **``$drip->``**. |
| 59 | + |
| 60 | +### Helper |
| 61 | +Just use the helper function **``drip()``** instead of the native call **``$drip->``**. |
| 62 | + |
| 63 | +## Changelog <a name="changelog"></a> |
| 64 | +Please see [CHANGELOG](CHANGELOG.md) for more information what has changed recently. |
| 65 | + |
| 66 | +## Contributing <a name="contributing"></a> |
| 67 | +Please see [CONTRIBUTING](CONTRIBUTING.md) for details. |
| 68 | + |
| 69 | +## License <a name="license"></a> |
| 70 | +The MIT License (MIT). Please see [LICENSE](LICENSE.md) for more information. |
0 commit comments