PHPackages                             tequilarapido/restrict-access - 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. tequilarapido/restrict-access

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

tequilarapido/restrict-access
=============================

1.0.4(6y ago)066[1 PRs](https://github.com/tequilarapido/restrict-access/pulls)MITPHP

Since Nov 21Pushed 5y ago3 watchersCompare

[ Source](https://github.com/tequilarapido/restrict-access)[ Packagist](https://packagist.org/packages/tequilarapido/restrict-access)[ Docs](https://github.com/tequilarapido/restrict-access)[ RSS](/packages/tequilarapido-restrict-access/feed)WikiDiscussions master Synced today

READMEChangelog (3)Dependencies (4)Versions (8)Used By (0)

[![Latest Version on Packagist](https://camo.githubusercontent.com/a5744268a9e0f49f9c677d02530ad404585d60f1b1239c309cf71376476083f8/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f74657175696c6172617069646f2f72657374726963742d6163636573732e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/tequilarapido/restrict-access)[![Software License](https://camo.githubusercontent.com/55c0218c8f8009f06ad4ddae837ddd05301481fcf0dff8e0ed9dadda8780713e/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f6c6963656e73652d4d49542d627269676874677265656e2e7376673f7374796c653d666c61742d737175617265)](LICENSE.md)[![StyleCI](https://camo.githubusercontent.com/50e19444edc906c879588254d2fcfdf3493f0eaa308e493cab30b56fc5487156/68747470733a2f2f7374796c6563692e696f2f7265706f732f37343339303332332f736869656c64)](https://styleci.io/repos/74390323)[![Quality Score](https://camo.githubusercontent.com/7fff9105511b4169f895a7bf1030ddc5a3a8cdaddbaaad7fa1b3d9bfb14256c4/68747470733a2f2f696d672e736869656c64732e696f2f7363727574696e697a65722f672f74657175696c6172617069646f2f72657374726963742d6163636573732e7376673f7374796c653d666c61742d737175617265)](https://scrutinizer-ci.com/g/tequilarapido/restrict-access)

 ![]()

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

[](#installation)

You can install the package using composer

```
$ composer require tequilarapido/restrict-access
```

Usage
-----

[](#usage)

- Add service provider

```
Tequilarapido\RestrictAccess\ServiceProvider::class,

```

- Add middlewares to kernel

```
protected $routeMiddleware = [
        'restrict_access_by_ip' => RestrictAccessByIp::class,
        'restrict_access_by_basic_auth' => RestrictAccessByBasicAuthentication::class,
    ];

```

- Add middleware to routes on witch you need to restrict access
- Env file

```
RESTRICT_ACCESS_BY_BASIC_AUTH_ENABLED=true
RESTRICT_ACCESS_BY_BASIC_AUTH_usename=username
RESTRICT_ACCESS_BY_BASIC_AUTH_password=password

RESTRICT_ACCESS_BY_IP_ENABLED=false
RESTRICT_ACCESS_BY_IP_ENABLED_EXCEPT=a,b,c

```

License
-------

[](#license)

The MIT License (MIT). Please see [License File](LICENSE.md) for more information.

###  Health Score

29

—

LowBetter than 57% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity8

Limited adoption so far

Community8

Small or concentrated contributor base

Maturity68

Established project with proven stability

 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 ~239 days

Recently: every ~283 days

Total

6

Last Release

2310d ago

Major Versions

0.0.1 → 1.0.02017-01-25

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/276832?v=4)[Nassif Bourguig](/maintainers/nbourguig)[@nbourguig](https://github.com/nbourguig)

---

Top Contributors

[![nbourguig](https://avatars.githubusercontent.com/u/276832?v=4)](https://github.com/nbourguig "nbourguig (16 commits)")

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/tequilarapido-restrict-access/health.svg)

```
[![Health](https://phpackages.com/badges/tequilarapido-restrict-access/health.svg)](https://phpackages.com/packages/tequilarapido-restrict-access)
```

###  Alternatives

[statamic-rad-pack/runway

Eloquently manage your database models in Statamic.

135212.4k7](/packages/statamic-rad-pack-runway)

PHPackages © 2026

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