PHPackages                             voyager-inc/simple-block-blacklist-and-whitelist-ip - 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. voyager-inc/simple-block-blacklist-and-whitelist-ip

ActiveLibrary[Security](/categories/security)

voyager-inc/simple-block-blacklist-and-whitelist-ip
===================================================

Simple block ip depend on blacklist and whitelist ip

069PHP

Since May 24Pushed 1y ago1 watchersCompare

[ Source](https://github.com/phutd-voyager/simple-block-blacklist-and-whitelist-ip)[ Packagist](https://packagist.org/packages/voyager-inc/simple-block-blacklist-and-whitelist-ip)[ RSS](/packages/voyager-inc-simple-block-blacklist-and-whitelist-ip/feed)WikiDiscussions main Synced 1mo ago

READMEChangelogDependenciesVersions (2)Used By (0)

Simple block blacklist and whitelist IP
=======================================

[](#simple-block-blacklist-and-whitelist-ip)

[`PHP v8.2`](https://php.net)

[`Laravel v11.x`](https://github.com/laravel/laravel)

Installation
------------

[](#installation)

```
composer require voyager-inc/simple-block-blacklist-and-whitelist-ip
```

- Publish provider

```
php artisan vendor:publish --provider="VoyagerInc\SimpleBlockBlacklistAndWhiteListIp\ServiceProvider"
```

Now you will see two migration files `create_simple_blacklist_ips_table.php` and `create_simple_whitelist_ips_table.php` in `database/migrations` folder

- Run migration

```
php artisan migrate
```

Usage
-----

[](#usage)

- We have two new middleware with the aliases `ip-filter-whitelist` and `ip-filter-blacklist`
- The `ip-filter-whitelist` middleware allows access only from whitelisted IPs.
- The `ip-filter-blacklist` middleware always prevents access from blacklisted IPs.
- We can update whitelist and blacklist in config `simple_block_blacklist_and_whitelist_ip.php` file

```
 true,

    'block_by' => 'config', // or database

    'whitelist_ip' => [
        //
    ],

    'blacklist_ip' => [
        //
    ],
];
```

- Example

```
Route::get('/test', function () {
    return 'Whitelist route';
})->middleware(['ip-filter-whitelist']); // middleware(['ip-filter-blacklist']
```

###  Health Score

16

—

LowBetter than 5% of packages

Maintenance26

Infrequent updates — may be unmaintained

Popularity8

Limited adoption so far

Community8

Small or concentrated contributor base

Maturity20

Early-stage or recently created project

 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.

### Community

Maintainers

![](https://www.gravatar.com/avatar/88914573f9e40f76c57e972ca786b9d384bd7fd7739381145acdbdb5e537fa72?d=identicon)[silz.it94](/maintainers/silz.it94)

![](https://www.gravatar.com/avatar/22c1d050d1c65dc15bfa55bdb69582bdc32b181e2f3dbe8e7bd5c95d39c74af5?d=identicon)[sonnn@voyager-hcm.com](/maintainers/sonnn@voyager-hcm.com)

---

Top Contributors

[![phutd-voyager](https://avatars.githubusercontent.com/u/167964846?v=4)](https://github.com/phutd-voyager "phutd-voyager (19 commits)")

### Embed Badge

![Health badge](/badges/voyager-inc-simple-block-blacklist-and-whitelist-ip/health.svg)

```
[![Health](https://phpackages.com/badges/voyager-inc-simple-block-blacklist-and-whitelist-ip/health.svg)](https://phpackages.com/packages/voyager-inc-simple-block-blacklist-and-whitelist-ip)
```

###  Alternatives

[defuse/php-encryption

Secure PHP Encryption Library

3.9k162.4M214](/packages/defuse-php-encryption)[roave/security-advisories

Prevents installation of composer packages with known security vulnerabilities: no API, simply require it

2.9k97.3M6.4k](/packages/roave-security-advisories)[mews/purifier

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

2.0k16.7M113](/packages/mews-purifier)[robrichards/xmlseclibs

A PHP library for XML Security

41278.1M118](/packages/robrichards-xmlseclibs)[bjeavons/zxcvbn-php

Realistic password strength estimation PHP library based on Zxcvbn JS

86917.5M63](/packages/bjeavons-zxcvbn-php)[enlightn/security-checker

A PHP dependency vulnerabilities scanner based on the Security Advisories Database.

33732.2M110](/packages/enlightn-security-checker)

PHPackages © 2026

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