Skip to content

Commit 4f023ae

Browse files
authored
Merge pull request #4 from vc-dhavaljoshi/main
Readme file update
2 parents 85e45cf + 780ca31 commit 4f023ae

File tree

3 files changed

+7
-6
lines changed

3 files changed

+7
-6
lines changed

README.md

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44

55
## Requirements
66

7-
Laravel 5.4 >
7+
PHP ^8.0
88

99
## Features
1010

@@ -26,7 +26,7 @@ After installation, You need to publish the config file for this package. This w
2626
php artisan vendor:publish
2727
```
2828

29-
### Config Usage
29+
### Config Usage (`ip-gateway.php`)
3030

3131
* `enable_package` is used for enable/disable access protection.
3232

@@ -38,6 +38,7 @@ php artisan vendor:publish
3838

3939
* You can define all your whitelist or blacklist IP addresses inside `ip-list`.
4040

41+
* If you want to add IP gateway middleware in you custom middleware group then just define your custom middleware group inside `middleware`
4142
### Changelog
4243

4344
Please see [CHANGELOG](CHANGELOG.md) for more information on what has changed recently.

publishable/config/ip-gateway.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -25,8 +25,8 @@
2525
*
2626
* @var array
2727
*/
28-
'Middleware' => [
29-
'web' // Default Middleware
28+
'middleware' => [
29+
'web' // Default Middleware Group
3030
],
3131

3232
/*
@@ -42,7 +42,7 @@
4242
* Whitelisted and blacklisted IP addresses
4343
*
4444
* Examples of IP address
45-
* '127.0.0.0',
45+
* '127.0.0.1',
4646
*
4747
* @type array
4848
*/

src/IpGatewayProvider.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ public function boot()
2222
$router = $this->app['router'];
2323

2424
if (config('ip-gateway')) {
25-
foreach (config('ip-gateway.Middleware') as $middlewareName) {
25+
foreach (config('ip-gateway.middleware') as $middlewareName) {
2626
$router->pushMiddlewareToGroup($middlewareName, IpGatewayMiddleware::class);
2727
}
2828
}

0 commit comments

Comments
 (0)