Skip to content

Commit 1150bf5

Browse files
author
Prosper Otemuyiwa
authored
Merge pull request #31 from kingflamez/auto-discovery
Paystack auto-discovery for Laravel 5.5
2 parents ba51afd + 9d8aeb3 commit 1150bf5

File tree

2 files changed

+21
-1
lines changed

2 files changed

+21
-1
lines changed

README.md

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,16 +12,26 @@
1212

1313
[PHP](https://php.net) 5.4+ or [HHVM](http://hhvm.com) 3.3+, and [Composer](https://getcomposer.org) are required.
1414

15-
To get the latest version of Laravel Paystack, simply add the following line to the require block of your `composer.json` file.
15+
To get the latest version of Laravel Paystack, simply require it
16+
17+
```bash
18+
composer require unicodeveloper/laravel-paystack
19+
```
20+
21+
Or add the following line to the require block of your `composer.json` file.
1622

1723
```
1824
"unicodeveloper/laravel-paystack": "1.0.*"
1925
```
2026

2127
You'll then need to run `composer install` or `composer update` to download it and have the autoloader updated.
2228

29+
30+
2331
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.
2432

33+
> If you use **Laravel >= 5.5** you can skip this step and go to [**`configuration`**](https://github.com/unicodeveloper/laravel-paystack#configuration)
34+
2535
* `Unicodeveloper\Paystack\PaystackServiceProvider::class`
2636

2737
Also, register the Facade like so:

composer.json

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -37,5 +37,15 @@
3737
},
3838
"scripts": {
3939
"test": "vendor/bin/phpunit"
40+
},
41+
"extra": {
42+
"laravel": {
43+
"providers": [
44+
"Unicodeveloper\\Paystack\\PaystackServiceProvider"
45+
],
46+
"aliases": {
47+
"Paystack": "Unicodeveloper\\Paystack\\Facades\\Paystack"
48+
}
4049
}
50+
}
4151
}

0 commit comments

Comments
 (0)