Skip to content

Commit c350c71

Browse files
authored
Merge pull request #8 from BespredeL/develop
develop
2 parents f5ac7cb + fef8250 commit c350c71

File tree

3 files changed

+17
-15
lines changed

3 files changed

+17
-15
lines changed

README.md

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
11
# GeoRestrict Middleware for Laravel
22

3-
[![Readme EN](https://img.shields.io/badge/README-EN-blue.svg)](https://github.com/bespredel/GeoRestrict/blob/master/README.md)
4-
[![Readme RU](https://img.shields.io/badge/README-RU-blue.svg)](https://github.com/bespredel/GeoRestrict/blob/master/README_RU.md)
5-
[![GitHub license](https://img.shields.io/badge/license-MIT-458a7b.svg)](https://github.com/bespredel/GeoRestrict/blob/master/LICENSE)
3+
[![Readme EN](https://img.shields.io/badge/README-EN-blue.svg)](https://github.com/BespredeL/geo-restrict/blob/master/README.md)
4+
[![Readme RU](https://img.shields.io/badge/README-RU-blue.svg)](https://github.com/BespredeL/geo-restrict/blob/master/README_RU.md)
5+
[![GitHub license](https://img.shields.io/badge/license-MIT-458a7b.svg)](https://github.com/BespredeL/geo-restrict/blob/master/LICENSE)
66
[![Downloads](https://img.shields.io/packagist/dt/bespredel/geo-restrict.svg)](https://packagist.org/packages/bespredel/geo-restrict)
77

8-
[![Latest Version](https://img.shields.io/github/v/release/bespredel/GeoRestrict?logo=github)](https://github.com/bespredel/GeoRestrict/releases)
8+
[![Latest Version](https://img.shields.io/github/v/release/bespredel/GeoRestrict?logo=github)](https://github.com/BespredeL/geo-restrict/releases)
99
[![Latest Version Packagist](https://img.shields.io/packagist/v/bespredel/geo-restrict.svg?logo=packagist&logoColor=white&color=F28D1A)](https://packagist.org/packages/bespredel/geo-restrict)
1010
[![PHP from Packagist](https://img.shields.io/packagist/php-v/bespredel/geo-restrict.svg?logo=php&logoColor=white&color=777BB4)](https://php.net)
1111
[![Laravel Version](https://img.shields.io/badge/laravel-%3E%3D10-FF2D20?logo=laravel)](https://laravel.com)
@@ -201,15 +201,15 @@ This makes it easy to add new providers and ensures all logic is unified and DRY
201201
1. Add the middleware to routes:
202202

203203
```php
204-
Route::middleware(['geo.restrict'])->group(function () {
204+
Route::middleware(['geo-restrict'])->group(function () {
205205
// ...
206206
});
207207
```
208208

209209
2. Or apply directly:
210210

211211
```php
212-
Route::get('/secret', 'SecretController@index')->middleware('geo.restrict');
212+
Route::get('/secret', 'SecretController@index')->middleware('geo-restrict');
213213
```
214214

215215
## Customization
@@ -243,4 +243,4 @@ No code changes are required — the language is detected automatically based on
243243

244244
## License
245245

246-
MIT
246+
This package is open-source software licensed under the MIT license.

README_RU.md

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
11
# GeoRestrict Middleware for Laravel
22

3-
[![Readme EN](https://img.shields.io/badge/README-EN-blue.svg)](https://github.com/bespredel/GeoRestrict/blob/master/README.md)
4-
[![Readme RU](https://img.shields.io/badge/README-RU-blue.svg)](https://github.com/bespredel/GeoRestrict/blob/master/README_RU.md)
5-
[![GitHub license](https://img.shields.io/badge/license-MIT-458a7b.svg)](https://github.com/bespredel/GeoRestrict/blob/master/LICENSE)
3+
[![Readme EN](https://img.shields.io/badge/README-EN-blue.svg)](https://github.com/BespredeL/geo-restrict/blob/master/README.md)
4+
[![Readme RU](https://img.shields.io/badge/README-RU-blue.svg)](https://github.com/BespredeL/geo-restrict/blob/master/README_RU.md)
5+
[![GitHub license](https://img.shields.io/badge/license-MIT-458a7b.svg)](https://github.com/BespredeL/geo-restrict/blob/master/LICENSE)
66
[![Downloads](https://img.shields.io/packagist/dt/bespredel/geo-restrict.svg)](https://packagist.org/packages/bespredel/geo-restrict)
77

8-
[![Latest Version](https://img.shields.io/github/v/release/bespredel/GeoRestrict?logo=github)](https://github.com/bespredel/GeoRestrict/releases)
8+
[![Latest Version](https://img.shields.io/github/v/release/bespredel/GeoRestrict?logo=github)](https://github.com/BespredeL/geo-restrict/releases)
99
[![Latest Version Packagist](https://img.shields.io/packagist/v/bespredel/geo-restrict.svg?logo=packagist&logoColor=white&color=F28D1A)](https://packagist.org/packages/bespredel/geo-restrict)
1010
[![PHP from Packagist](https://img.shields.io/packagist/php-v/bespredel/geo-restrict.svg?logo=php&logoColor=white&color=777BB4)](https://php.net)
1111
[![Laravel Version](https://img.shields.io/badge/laravel-%3E%3D10-FF2D20?logo=laravel)](https://laravel.com)
@@ -201,15 +201,15 @@ class ExampleProvider extends AbstractGeoProvider {
201201
1. Добавьте middleware в нужные маршруты:
202202

203203
```php
204-
Route::middleware(['geo.restrict'])->group(function () {
204+
Route::middleware(['geo-restrict'])->group(function () {
205205
// ...
206206
});
207207
```
208208

209209
2. Или используйте alias:
210210

211211
```php
212-
Route::get('/secret', 'SecretController@index')->middleware('geo.restrict');
212+
Route::get('/secret', 'SecretController@index')->middleware('geo-restrict');
213213
```
214214

215215
## Кастомизация
@@ -243,4 +243,4 @@ resources/lang/it/messages.php
243243

244244
## Лицензия
245245

246-
MIT
246+
Этот пакет представляет собой программное обеспечение с открытым исходным кодом, лицензированное по лицензии MIT.

config/geo-restrict.php

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,8 @@
1010
| A prioritized list of GeoIP services to detect location by IP address.
1111
| If a service is unavailable or fails, the next one will be used.
1212
|
13+
| See https://github.com/bespredel/geo-restrict#provider-architecture
14+
|
1315
*/
1416
'services' => [
1517
[
@@ -19,7 +21,7 @@
1921
[
2022
'provider' => \Bespredel\GeoRestrict\Providers\IpApiComProvider::class,
2123
'options' => [
22-
'api_key' => 'your-api-key',
24+
'api_key' => 'your-api-key', // optional
2325
'lang' => 'en', // optional
2426
],
2527
],

0 commit comments

Comments
 (0)