PHPackages                             gorankrgovic/laravel-access-protect - 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. gorankrgovic/laravel-access-protect

ActiveLibrary[Security](/categories/security)

gorankrgovic/laravel-access-protect
===================================

Simple, configurable access for your laravel site. Useful in cases when you want to lock the stage or dev environment.

v0.1.01(7y ago)0104MITPHPPHP ^7.0

Since Mar 16Pushed 7y ago1 watchersCompare

[ Source](https://github.com/gorankrgovic/laravel-access-protect)[ Packagist](https://packagist.org/packages/gorankrgovic/laravel-access-protect)[ Docs](https://github.com/gorankrgovic/laravel-access-protect)[ RSS](/packages/gorankrgovic-laravel-access-protect/feed)WikiDiscussions master Synced yesterday

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

Site wide password access protection for Laravel
================================================

[](#site-wide-password-access-protection-for-laravel)

This will add a simple password form in front of your application to protected it from any access. The password is specified using the .env file. You can protect development or staging sites.

Also, since the request code is configurable, you can enjoy this package without health check errors if your application is behind Elastic Beanstalk.

You can define multiple passwords.

### Installation

[](#installation)

```
composer require gorankrgovic/laravel-access-protect
```

#### Laravel &gt;= 5.5

[](#laravel--55)

You don't need to add this package to your `app/config/app.php` since it supports auto discovery.

### Add Middleware

[](#add-middleware)

Add Middleware to `app/Http/Kernel.php` or specific routes you want to protect.

```
protected $middlewareGroups = [
    'web' => [
        ...
        \Gox\Laravel\Http\Middleware\AccessProtect::class,
    ],
    ...
];
```

### Configuration

[](#configuration)

Add your password to `.env`. You can use multiple passwords separated by comma.

```
ACCESS_PROTECT_PASSWORDS=pass1,pass2

```

To revoke access to your site simply change the password. This requires every user using the old password to re-enter a password.

### Customization

[](#customization)

You can modify the view that handles password entry by publishing the views to your resource folder.

```
php artisan vendor:publish --provider="Gox\Laravel\AccessProtect\Provides\AccessProtectServiceProvider" --tag=views
```

and config

```
php artisan vendor:publish --provider="Gox\Laravel\AccessProtect\Provides\AccessProtectServiceProvider" --tag=config
```

That's it...

###  Health Score

23

—

LowBetter than 27% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity9

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity48

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

Total

4

Last Release

2614d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/dc897661efd3f9b1d0b6cee6fa6eb2f5535819e0c2e0a0adab66b4d6002133be?d=identicon)[gorankrgovic](/maintainers/gorankrgovic)

---

Top Contributors

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

---

Tags

middlewarelaravelprotect

### Embed Badge

![Health badge](/badges/gorankrgovic-laravel-access-protect/health.svg)

```
[![Health](https://phpackages.com/badges/gorankrgovic-laravel-access-protect/health.svg)](https://phpackages.com/packages/gorankrgovic-laravel-access-protect)
```

###  Alternatives

[masterro/laravel-xss-filter

Filter user input for XSS but don't touch other html

41254.5k](/packages/masterro-laravel-xss-filter)[stevenmaguire/laravel-middleware-csp

Provides support for enforcing Content Security Policy with headers in Laravel responses.

39107.6k](/packages/stevenmaguire-laravel-middleware-csp)[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)
