PHPackages                             code16/privat - 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. code16/privat

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

code16/privat
=============

Simple private access package for Laravel.

v4.1.1(2mo ago)1347.8k—0.3%8[1 issues](https://github.com/code16/privat/issues)[1 PRs](https://github.com/code16/privat/pulls)MITPHPPHP 8.4.\*|8.5.\*CI failing

Since Oct 16Pushed 2mo ago1 watchersCompare

[ Source](https://github.com/code16/privat)[ Packagist](https://packagist.org/packages/code16/privat)[ RSS](/packages/code16-privat/feed)WikiDiscussions main Synced yesterday

READMEChangelogDependencies (18)Versions (26)Used By (0)

Privat
======

[](#privat)

[![Latest Version on Packagist](https://camo.githubusercontent.com/3ddaf1f6fd5987079712d8fb53772b6bf7f02e30464bad12412ec029eb96aef1/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f636f646531362f7072697661742e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/code16/privat)[![MIT Licensed](https://camo.githubusercontent.com/55c0218c8f8009f06ad4ddae837ddd05301481fcf0dff8e0ed9dadda8780713e/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f6c6963656e73652d4d49542d627269676874677265656e2e7376673f7374796c653d666c61742d737175617265)](LICENSE.md)[![Tests](https://github.com/code16/privat/actions/workflows/main.yml/badge.svg)](https://github.com/code16/privat/actions/workflows/main.yml)[![Total Downloads](https://camo.githubusercontent.com/a8d184a259b2c24eb4871ca5cf808a50b18b72e9c52c1bda5cbbfc8049318841/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f64742f636f646531362f7072697661742e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/code16/privat)

Privat is a very simple password protection for Laravel projects. It's useful for websites in a staging state.

[![Screenshot](screenshot.png)](screenshot.png)

Usage
-----

[](#usage)

### Install with composer

[](#install-with-composer)

```
composer require code16/privat
```

### Configure Privat via .env keys

[](#configure-privat-via-env-keys)

```
PRIVAT_ENABLED=true
PRIVAT_PASSWORD=mypassword
```

Advanced usage
--------------

[](#advanced-usage)

### Choose impacted middleware groups

[](#choose-impacted-middleware-groups)

By default, Privat will protect the `web` middleware group. If you want to impact other groups, you can tweak the corresponding .env key:

```
PRIVAT_MIDDLEWARE_GROUP=web,admin
```

### Handle exceptions

[](#handle-exceptions)

You can exclude some hosts or URLs from Privat:

```
PRIVAT_EXCEPTED_URLS="/login,/admin"
PRIVAT_EXCEPTED_HOSTS="admin.mywebsite.com"
```

### Waiting page

[](#waiting-page)

If you need to present a public waiting page, set the waiting page view name in the `PRIVAT_WAITING_VIEW` env key:

```
PRIVAT_WAITING_VIEW="demo.waiting"
```

From then, all requests without the Privat registration will be redirected to `/privat_waiting` which will render the configured view, except `/privat`, which will still present the Privat form.

### Publish the config file

[](#publish-the-config-file)

Of course, you can publish the config file instead of using env variables (even if we think it’s more convenient for such a tool):

```
php artisan vendor:publish --provider="Code16\Privat\PrivatServiceProvider"
```

How does it work
----------------

[](#how-does-it-work)

Quite simple: if the given password is correct, Privat sets a session property, and look for it on each request. So, obviously, Privat won't work on non session based systems (an API for instance).

License
-------

[](#license)

MIT

###  Health Score

62

—

FairBetter than 99% of packages

Maintenance82

Actively maintained with recent releases

Popularity38

Limited adoption so far

Community16

Small or concentrated contributor base

Maturity91

Battle-tested with a long release history

 Bus Factor1

Top contributor holds 60.3% 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 ~155 days

Recently: every ~191 days

Total

21

Last Release

81d ago

Major Versions

v1.0 → v2.02017-10-18

v2.4 → v3.02019-09-27

v3.x-dev → v4.0.02025-02-28

PHP version history (10 changes)v1.0PHP &gt;=5.5.9

v3.0PHP &gt;=7.1.3

v3.3.0PHP &gt;=7.3

v3.4.0PHP &gt;=7.4

v3.6.0PHP ^7.4|^8.1|^8.2

v3.7.0PHP ^8.1|^8.2

v3.10.0PHP ^8.1|^8.2|^8.3

v3.x-devPHP 8.4.\*

v4.1.0PHP ^8.4

v4.1.1PHP 8.4.\*|8.5.\*

### Community

Maintainers

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

---

Top Contributors

[![dvlpp](https://avatars.githubusercontent.com/u/973325?v=4)](https://github.com/dvlpp "dvlpp (47 commits)")[![smknstd](https://avatars.githubusercontent.com/u/2412608?v=4)](https://github.com/smknstd "smknstd (12 commits)")[![PatrickePatate](https://avatars.githubusercontent.com/u/16721134?v=4)](https://github.com/PatrickePatate "PatrickePatate (8 commits)")[![RemiCollin](https://avatars.githubusercontent.com/u/9589616?v=4)](https://github.com/RemiCollin "RemiCollin (8 commits)")[![PierreBillaud](https://avatars.githubusercontent.com/u/43741101?v=4)](https://github.com/PierreBillaud "PierreBillaud (3 commits)")

---

Tags

demolaravelpassword-protectionwaitingpage

###  Code Quality

TestsPest

### Embed Badge

![Health badge](/badges/code16-privat/health.svg)

```
[![Health](https://phpackages.com/badges/code16-privat/health.svg)](https://phpackages.com/packages/code16-privat)
```

###  Alternatives

[statamic-rad-pack/runway

Eloquently manage your database models in Statamic.

135224.7k7](/packages/statamic-rad-pack-runway)[jeremy379/laravel-openid-connect

OpenID Connect support to the PHP League's OAuth2 Server. Compatible with Laravel Passport.

59437.0k9](/packages/jeremy379-laravel-openid-connect)[ecotone/laravel

Ecotone for Laravel — CQRS, Event Sourcing, Sagas, Durable Workflows, and Outbox on top of Laravel Queue, via PHP attributes.

21318.6k3](/packages/ecotone-laravel)

PHPackages © 2026

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