PHPackages                             rabianr/laravel-ip-restrictions - 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. [Authentication &amp; Authorization](/categories/authentication)
4. /
5. rabianr/laravel-ip-restrictions

ActiveLibrary[Authentication &amp; Authorization](/categories/authentication)

rabianr/laravel-ip-restrictions
===============================

Ip restrictions Middleware for Laravel

1.2(4y ago)012MITPHPPHP &gt;=7.2

Since Nov 9Pushed 4y ago1 watchersCompare

[ Source](https://github.com/rabianr/laravel-ip-restrictions)[ Packagist](https://packagist.org/packages/rabianr/laravel-ip-restrictions)[ RSS](/packages/rabianr-laravel-ip-restrictions/feed)WikiDiscussions master Synced 3w ago

READMEChangelogDependencies (6)Versions (4)Used By (0)

Ip restrictions Middleware for Laravel
======================================

[](#ip-restrictions-middleware-for-laravel)

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

[](#installation)

```
composer require rabianr/laravel-ip-restrictions
```

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

[](#configuration)

Publish the config to copy the file to your own config:

```
php artisan vendor:publish --tag="iprestrictions"
```

Usage
-----

[](#usage)

Set `iprestrictions` middleware to any route that require Basic Auth.

Define ip addresses in `config/iprestrictions.php` config file.

```
'whitelist' => array_merge([
    '1.1.1.1',
], array_filter(explode(',', env('IPRESTRICTIONS_WHITELIST', '')))),
```

or in `.env` file

```
IPRESTRICTIONS_WHITELIST=1.1.1.1,1.1.1.2

```

###  Health Score

22

—

LowBetter than 21% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity5

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity47

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

Every ~41 days

Total

3

Last Release

1616d ago

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/76022206?v=4)[rabianr](/maintainers/rabianr)[@rabianr](https://github.com/rabianr)

---

Top Contributors

[![rabianr](https://avatars.githubusercontent.com/u/76022206?v=4)](https://github.com/rabianr "rabianr (3 commits)")

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/rabianr-laravel-ip-restrictions/health.svg)

```
[![Health](https://phpackages.com/badges/rabianr-laravel-ip-restrictions/health.svg)](https://phpackages.com/packages/rabianr-laravel-ip-restrictions)
```

###  Alternatives

[illuminate/routing

The Illuminate Routing package.

1419.2M3.0k](/packages/illuminate-routing)[symfony/security-bundle

Provides a tight integration of the Security component into the Symfony full-stack framework

2.5k185.6M2.4k](/packages/symfony-security-bundle)[symfony/security-http

Symfony Security Component - HTTP Integration

1.7k177.2M384](/packages/symfony-security-http)[moonshine/moonshine

Laravel administration panel

1.3k253.1k81](/packages/moonshine-moonshine)[illuminate/cookie

The Illuminate Cookie package.

244.6M137](/packages/illuminate-cookie)[easycorp/easyadmin-bundle

Admin generator for Symfony applications

4.3k17.9M388](/packages/easycorp-easyadmin-bundle)

PHPackages © 2026

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