Skip to content

Commit 85e45cf

Browse files
authored
Merge pull request #3 from vc-dhavaljoshi/main
Php version upgrade
2 parents 1b3f646 + 292f170 commit 85e45cf

File tree

5 files changed

+16
-18
lines changed

5 files changed

+16
-18
lines changed

README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,13 +17,13 @@ Laravel 5.4 >
1717
You can install the package via composer:
1818

1919
```bash
20-
composer require viitorcloud/laravel-ip-gateway
20+
composer require vcian/laravel-ip-gateway
2121
```
2222

2323
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.
2424

2525
```bash
26-
php artisan vendor:publish --provider="LaravelIpGateway\IpGatewayProvider"
26+
php artisan vendor:publish
2727
```
2828

2929
### Config Usage

composer.json

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -16,24 +16,23 @@
1616
"license": "MIT",
1717
"authors": [
1818
{
19-
"name": "Rushikesh Soni",
20-
"email": "[email protected]",
19+
"name": "Vcian - Viitorcloud",
20+
"email": "[email protected]",
2121
"role": "Creator"
2222
}
2323
],
2424
"require": {
25-
"laravel/framework": ">5.4",
26-
"php": ">=5.4.0"
25+
"php": "^8.0"
2726
},
2827
"autoload": {
2928
"psr-4": {
30-
"LaravelIpGateway\\": "src/"
29+
"Vcian\\LaravelIpGateway\\": "src/"
3130
}
3231
},
3332
"extra": {
3433
"laravel": {
3534
"providers": [
36-
"LaravelIpGateway\\IpGatewayProvider"
35+
"Vcian\\LaravelIpGateway\\IpGatewayProvider"
3736
]
3837
}
3938
},

publishable/config/ip-gateway.php

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -19,14 +19,14 @@
1919
'enable_blacklist' => true,
2020

2121
/*
22-
* Enable IP detection for middleware
22+
* Enable IP detection for Middleware
2323
*
24-
* You can use middleware name ('auth')
24+
* You can use Middleware name like 'auth','web','api'
2525
*
2626
* @var array
2727
*/
28-
'middleware' => [
29-
28+
'Middleware' => [
29+
'web' // Default Middleware
3030
],
3131

3232
/*

src/IpGatewayProvider.php

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
<?php
22

3-
namespace LaravelIpGateway;
3+
namespace Vcian\LaravelIpGateway;
44

55
use Illuminate\Support\ServiceProvider;
6-
use LaravelIpGateway\Middleware\IpGatewayMiddleware;
6+
use Vcian\LaravelIpGateway\Middleware\IpGatewayMiddleware;
77

88
/**
99
* Class IpGatewayProvider
@@ -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
}
@@ -52,4 +52,4 @@ public function publishFiles()
5252
}
5353

5454
}
55-
}
55+
}

src/middleware/IpGatewayMiddleware.php renamed to src/Middleware/IpGatewayMiddleware.php

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
<?php
22

3-
namespace LaravelIpGateway\Middleware;
3+
namespace Vcian\LaravelIpGateway\Middleware;
44

55
use Closure;
66
use Illuminate\Support\Facades\Log;
@@ -28,7 +28,6 @@ class IpGatewayMiddleware
2828
public function handle($request, Closure $next)
2929
{
3030
$prohibitRequest = false;
31-
3231
if (config('ip-gateway')
3332
&& config('ip-gateway.enable_package') === true
3433
) {

0 commit comments

Comments
 (0)