PHPackages                             cresjie/ip-blocker - 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. cresjie/ip-blocker

ActiveLaravel-package[Security](/categories/security)

cresjie/ip-blocker
==================

Laravel IP address blocker

v1.2.0.0(9y ago)340MITPHPPHP &gt;=5.4.0

Since Feb 2Pushed 9y ago1 watchersCompare

[ Source](https://github.com/cresjie/ip-blocker)[ Packagist](https://packagist.org/packages/cresjie/ip-blocker)[ Docs](https://github.com/cresjie/ip-blocker)[ RSS](/packages/cresjie-ip-blocker/feed)WikiDiscussions v1.2 Synced 1mo ago

READMEChangelog (3)Dependencies (1)Versions (5)Used By (0)

Laravel 5 IP Blocker
====================

[](#laravel-5-ip-blocker)

Simple and easy to configure laravel ip blocker

for [Laravel 4](//github.com/cresjie/ip-blocker/tree/master)

---

Installation via Composer
-------------------------

[](#installation-via-composer)

Add this to your composer.json file, in the require object:

```
 "cresjie/ip-blocker": "v1.2.0.0"
```

After that, run composer install to install the package.

Add the service provider to app/config/app.php for laravel 4 and config/app.php for laravel 5, within the providers array.

```
 'providers' => array(
	...
	Cresjie\IpBlocker\IpBlockerServiceProvider::class,
)
```

Configuration
-------------

[](#configuration)

Publish the default config file to your application so you can make modifications.

```
$ php artisan vendor:publish

```

Add your block IP's to the configuration file:

```
 [L5 root]/config/cresjie/block-ip.php

```

Handling/Custom View
--------------------

[](#handlingcustom-view)

if the IP was blocked, it would throw Cresjie\\IpBlocker\\IpBlockerException. you could create a view by just handling the exception like this:

\#laravel 5

```
// app/Exceptions/Handler.php

public function render($request, Exception $e)
{
	switch($e){
		case ($e instanceof \Cresjie\IpBlocker\IpBlockerException):
			return response()->view('view-path');
			break;
		default:
			return parent::render($request, $e);

	}

    return parent::render($request, $e);
}
```

###  Health Score

28

—

LowBetter than 54% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity11

Limited adoption so far

Community9

Small or concentrated contributor base

Maturity61

Established project with proven stability

 Bus Factor1

Top contributor holds 50% 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

Every ~117 days

Total

4

Last Release

3398d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/69da713eaacadfbe5b0825dd9e1c239490d6cbfe31985aeffd7e78041ced8a7a?d=identicon)[cresjie](/maintainers/cresjie)

---

Top Contributors

[![cresjie](https://avatars.githubusercontent.com/u/8773060?v=4)](https://github.com/cresjie "cresjie (7 commits)")[![s900cres](https://avatars.githubusercontent.com/u/18436116?v=4)](https://github.com/s900cres "s900cres (7 commits)")

---

Tags

laravelIPfirewallblockercresjie

### Embed Badge

![Health badge](/badges/cresjie-ip-blocker/health.svg)

```
[![Health](https://phpackages.com/badges/cresjie-ip-blocker/health.svg)](https://phpackages.com/packages/cresjie-ip-blocker)
```

###  Alternatives

[pragmarx/firewall

A Laravel IP whitelisting and blacklisting

1.4k988.9k](/packages/pragmarx-firewall)[akaunting/laravel-firewall

Web Application Firewall (WAF) package for Laravel

999465.8k2](/packages/akaunting-laravel-firewall)[tzsk/otp

A secure, database-free One-Time Password (OTP) generator and verifier for PHP and Laravel.

241641.4k1](/packages/tzsk-otp)[laragear/poke

Keep your forms alive, avoid TokenMismatchException by gently poking your Laravel app

2211.5k](/packages/laragear-poke)

PHPackages © 2026

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