PHPackages                             webazin/country-middleware - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Security](/categories/security)
4. /
5. webazin/country-middleware

ActiveLibrary[Security](/categories/security)

webazin/country-middleware
==========================

country ban and country required captcha in route access

v1.0(4y ago)122MITPHP

Since Apr 18Pushed 4y agoCompare

[ Source](https://github.com/webazin/laravel-country-middleware)[ Packagist](https://packagist.org/packages/webazin/country-middleware)[ RSS](/packages/webazin-country-middleware/feed)WikiDiscussions main Synced today

READMEChangelogDependencies (1)Versions (2)Used By (0)

Laravel package for countries access control
============================================

[](#laravel-package-for-countries-access-control)

Install
=======

[](#install)

---

1-`composer require webazin/country-middleware`

2-Insert in laravel &lt; 5
`config/app.php`

`\Webazin\CountryMiddleware\CountryMiddlewareServiceProvider::class`

3-`php artisan vendor:publish`

4-`Webazin\CountryMiddleware\CountryMiddlewareServiceProvider`

Use
===

[](#use)

---

In your route add

`->middleware('countryCheck')`

---

Ban country
===========

[](#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)\]([https://en.wikipedia.org/wiki/List\_of\_ISO\_3166\_country\_codes](https://en.wikipedia.org/wiki/List_of_ISO_3166_country_codes)) ---

webazin.net

###  Health Score

23

—

LowBetter than 26% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity9

Limited adoption so far

Community6

Small or concentrated contributor base

Maturity49

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 100% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Unknown

Total

1

Last Release

1536d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/77ce3d4e5f45a422fb431d417329de94d8b99391fe2f131054f16fdb849a0f7a?d=identicon)[webazin](/maintainers/webazin)

---

Top Contributors

[![mahdi4187](https://avatars.githubusercontent.com/u/25785927?v=4)](https://github.com/mahdi4187 "mahdi4187 (23 commits)")

### Embed Badge

![Health badge](/badges/webazin-country-middleware/health.svg)

```
[![Health](https://phpackages.com/badges/webazin-country-middleware/health.svg)](https://phpackages.com/packages/webazin-country-middleware)
```

###  Alternatives

[mews/purifier

Laravel 5/6/7/8/9/10 HtmlPurifier Package

2.0k18.7M142](/packages/mews-purifier)[paragonie/ecc

PHP Elliptic Curve Cryptography library

24820.0k37](/packages/paragonie-ecc)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
