webazin/country-middleware

country ban and country required captcha in route access

v1.0 2022-04-18 11:46 UTC

This package is auto-updated.

Last update: 2024-12-20 13:36:51 UTC


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