webazin / country-middleware
country ban and country required captcha in route access
v1.0
2022-04-18 11:46 UTC
Requires
- torann/geoip: ^3.0
README
Install
1-composer require webazin/country-middleware
2-Insert in laravel < 5
config/app.php
\Webazin\CountryMiddleware\CountryMiddlewareServiceProvider::class
3-php artisan vendor:publish
4-Webazin\CountryMiddleware\CountryMiddlewareServiceProvider
Use
In your route add
->middleware('countryCheck')
Ban country
config/CountryMiddleware.php
Add country iso_code
For example
countries_ban' => ['US']
All iso code to below link
[https://en.wikipedia.org/wiki/List_of_ISO_3166_country_codes ](https://en.wikipedia.org/wiki/List_of_ISO_3166_country_codes)
webazin.net