Skip to content

Commit 3418aae

Browse files
committed
Update README.md
1 parent 4c0a12b commit 3418aae

File tree

1 file changed

+28
-18
lines changed

1 file changed

+28
-18
lines changed

README.md

Lines changed: 28 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -56,31 +56,21 @@ Use composer to install this package.
5656
$ composer update
5757
```
5858

59-
Create configuration file using artisan
60-
61-
```
62-
$ php artisan config:publish artdarek/oauth-4-laravel
63-
```
64-
6559
## Configuration
6660

67-
### Registering the Package
61+
There are two ways to configure oauth-4-laravel.
62+
You can choose the most convenient way for you.
63+
You can use package config file which can be
64+
generated through command line by artisan (option 1) or
65+
you can simply create a config file called ``oauth-4-laravel.php`` in your config directory (option 2).
6866

69-
Add an alias to the bottom of app/config/app.php
67+
(Option 1) Create configuration file for package using artisan command
7068

71-
```php
72-
'OAuth' => 'Artdarek\OAuth\Facade\OAuth',
7369
```
74-
75-
and register this service provider at the bottom of the `$providers` array:
76-
77-
```php
78-
'Artdarek\OAuth\OAuthServiceProvider',
70+
$ php artisan config:publish artdarek/oauth-4-laravel
7971
```
8072

81-
### Credentials
82-
83-
Add your credentials to ``app/config/packages/artdarek/oauth-4-laravel/config.php``
73+
(Option 2) Create configuration file manually in config directory ``app/config/oauth-4-laravel.php`` and put there code from below.
8474

8575
```php
8676
return array(
@@ -115,6 +105,26 @@ return array(
115105
);
116106
```
117107

108+
109+
### Registering the Package
110+
111+
Add an alias to the bottom of app/config/app.php
112+
113+
```php
114+
'OAuth' => 'Artdarek\OAuth\Facade\OAuth',
115+
```
116+
117+
and register this service provider at the bottom of the `$providers` array:
118+
119+
```php
120+
'Artdarek\OAuth\OAuthServiceProvider',
121+
```
122+
123+
### Credentials
124+
125+
Add your credentials to ``app/config/packages/artdarek/oauth-4-laravel/config.php`` or ``app/config/oauth-4-laravel.php`` (depending on which option of configuration you choose)
126+
127+
118128
The `Storage` attribute is optional and defaults to `Session`.
119129
Other [options](https://github.com/Lusitanian/PHPoAuthLib/tree/master/src/OAuth/Common/Storage).
120130

0 commit comments

Comments
 (0)