From 9d8aeb3e490a798fdef770d372ab9665832fad3e Mon Sep 17 00:00:00 2001 From: kingflamez Date: Thu, 4 Jan 2018 00:28:12 +0100 Subject: [PATCH] Paystack auto-discovery --- README.md | 12 +++++++++++- composer.json | 10 ++++++++++ 2 files changed, 21 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index ff074d5..bf907fd 100644 --- a/README.md +++ b/README.md @@ -12,7 +12,13 @@ [PHP](https://php.net) 5.4+ or [HHVM](http://hhvm.com) 3.3+, and [Composer](https://getcomposer.org) are required. -To get the latest version of Laravel Paystack, simply add the following line to the require block of your `composer.json` file. +To get the latest version of Laravel Paystack, simply require it + +```bash +composer require unicodeveloper/laravel-paystack +``` + +Or add the following line to the require block of your `composer.json` file. ``` "unicodeveloper/laravel-paystack": "1.0.*" @@ -20,8 +26,12 @@ To get the latest version of Laravel Paystack, simply add the following line to You'll then need to run `composer install` or `composer update` to download it and have the autoloader updated. + + Once Laravel Paystack is installed, you need to register the service provider. Open up `config/app.php` and add the following to the `providers` key. +> If you use **Laravel >= 5.5** you can skip this step and go to [**`configuration`**](https://github.com/unicodeveloper/laravel-paystack#configuration) + * `Unicodeveloper\Paystack\PaystackServiceProvider::class` Also, register the Facade like so: diff --git a/composer.json b/composer.json index 7ae36de..9b4eb51 100644 --- a/composer.json +++ b/composer.json @@ -37,5 +37,15 @@ }, "scripts": { "test": "vendor/bin/phpunit" + }, + "extra": { + "laravel": { + "providers": [ + "Unicodeveloper\\Paystack\\PaystackServiceProvider" + ], + "aliases": { + "Paystack": "Unicodeveloper\\Paystack\\Facades\\Paystack" + } } + } }