Skip to content

Commit

Permalink
Merge pull request #7 from vc-bharat/main
Browse files Browse the repository at this point in the history
Solved the issue during installed the package via composer require co…
  • Loading branch information
ruchit288 authored Jun 23, 2023
2 parents 3f80d7c + d488a69 commit d4f7414
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions src/IpGatewayProvider.php
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,10 @@ class IpGatewayProvider extends ServiceProvider
public function boot()
{
$router = $this->app['router'];
foreach (config('ip-gateway.middleware') as $middlewareName) {
$router->pushMiddlewareToGroup($middlewareName, IpGatewayMiddleware::class);
if(config('ip-gateway')){
foreach (config('ip-gateway.middleware') as $middlewareName) {
$router->pushMiddlewareToGroup($middlewareName, IpGatewayMiddleware::class);
}
}
}

Expand Down

0 comments on commit d4f7414

Please sign in to comment.