Skip to content

Commit

Permalink
Merge pull request #3 from vc-dhavaljoshi/main
Browse files Browse the repository at this point in the history
Php version upgrade
  • Loading branch information
ruchit288 authored Apr 11, 2023
2 parents 1b3f646 + 292f170 commit 85e45cf
Show file tree
Hide file tree
Showing 5 changed files with 16 additions and 18 deletions.
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,13 +17,13 @@ Laravel 5.4 >
You can install the package via composer:

```bash
composer require viitorcloud/laravel-ip-gateway
composer require vcian/laravel-ip-gateway
```

After installation, You need to publish the config file for this package. This will add the file `config/ip-gateway.php`, where you can configure this package.

```bash
php artisan vendor:publish --provider="LaravelIpGateway\IpGatewayProvider"
php artisan vendor:publish
```

### Config Usage
Expand Down
11 changes: 5 additions & 6 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -16,24 +16,23 @@
"license": "MIT",
"authors": [
{
"name": "Rushikesh Soni",
"email": "[email protected]",
"name": "Vcian - Viitorcloud",
"email": "[email protected]",
"role": "Creator"
}
],
"require": {
"laravel/framework": ">5.4",
"php": ">=5.4.0"
"php": "^8.0"
},
"autoload": {
"psr-4": {
"LaravelIpGateway\\": "src/"
"Vcian\\LaravelIpGateway\\": "src/"
}
},
"extra": {
"laravel": {
"providers": [
"LaravelIpGateway\\IpGatewayProvider"
"Vcian\\LaravelIpGateway\\IpGatewayProvider"
]
}
},
Expand Down
8 changes: 4 additions & 4 deletions publishable/config/ip-gateway.php
Original file line number Diff line number Diff line change
Expand Up @@ -19,14 +19,14 @@
'enable_blacklist' => true,

/*
* Enable IP detection for middleware
* Enable IP detection for Middleware
*
* You can use middleware name ('auth')
* You can use Middleware name like 'auth','web','api'
*
* @var array
*/
'middleware' => [

'Middleware' => [
'web' // Default Middleware
],

/*
Expand Down
8 changes: 4 additions & 4 deletions src/IpGatewayProvider.php
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
<?php

namespace LaravelIpGateway;
namespace Vcian\LaravelIpGateway;

use Illuminate\Support\ServiceProvider;
use LaravelIpGateway\Middleware\IpGatewayMiddleware;
use Vcian\LaravelIpGateway\Middleware\IpGatewayMiddleware;

/**
* Class IpGatewayProvider
Expand All @@ -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 Expand Up @@ -52,4 +52,4 @@ public function publishFiles()
}

}
}
}
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?php

namespace LaravelIpGateway\Middleware;
namespace Vcian\LaravelIpGateway\Middleware;

use Closure;
use Illuminate\Support\Facades\Log;
Expand Down Expand Up @@ -28,7 +28,6 @@ class IpGatewayMiddleware
public function handle($request, Closure $next)
{
$prohibitRequest = false;

if (config('ip-gateway')
&& config('ip-gateway.enable_package') === true
) {
Expand Down

0 comments on commit 85e45cf

Please sign in to comment.