Skip to content

Commit

Permalink
Merge pull request #4 from vc-dhavaljoshi/main
Browse files Browse the repository at this point in the history
Readme file update
  • Loading branch information
viitoradmin authored Apr 12, 2023
2 parents 85e45cf + 780ca31 commit 4f023ae
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 6 deletions.
5 changes: 3 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

## Requirements

Laravel 5.4 >
PHP ^8.0

## Features

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

### Config Usage
### Config Usage (`ip-gateway.php`)

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

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

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

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

Please see [CHANGELOG](CHANGELOG.md) for more information on what has changed recently.
Expand Down
6 changes: 3 additions & 3 deletions publishable/config/ip-gateway.php
Original file line number Diff line number Diff line change
Expand Up @@ -25,8 +25,8 @@
*
* @var array
*/
'Middleware' => [
'web' // Default Middleware
'middleware' => [
'web' // Default Middleware Group
],

/*
Expand All @@ -42,7 +42,7 @@
* Whitelisted and blacklisted IP addresses
*
* Examples of IP address
* '127.0.0.0',
* '127.0.0.1',
*
* @type array
*/
Expand Down
2 changes: 1 addition & 1 deletion src/IpGatewayProvider.php
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ public function boot()
$router = $this->app['router'];

if (config('ip-gateway')) {
foreach (config('ip-gateway.Middleware') as $middlewareName) {
foreach (config('ip-gateway.middleware') as $middlewareName) {
$router->pushMiddlewareToGroup($middlewareName, IpGatewayMiddleware::class);
}
}
Expand Down

0 comments on commit 4f023ae

Please sign in to comment.