PHPackages                             kaoken/laravel5-private-mode - 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. [Utility &amp; Helpers](/categories/utility)
4. /
5. kaoken/laravel5-private-mode

ActiveLibrary[Utility &amp; Helpers](/categories/utility)

kaoken/laravel5-private-mode
============================

Available in laravel5 or higher, similar to maintenance mode.

1.2.1(8y ago)0221MITPHPPHP &gt;=7.0

Since Jan 9Pushed 6y ago1 watchersCompare

[ Source](https://github.com/kaoken/laravel5-private-mode)[ Packagist](https://packagist.org/packages/kaoken/laravel5-private-mode)[ Docs](https://github.com/kaoken/laravel5-private-mode)[ RSS](/packages/kaoken-laravel5-private-mode/feed)WikiDiscussions master Synced 2d ago

READMEChangelogDependencies (2)Versions (2)Used By (0)

laravel5-private-mode
=====================

[](#laravel5-private-mode)

[![Build Status](https://camo.githubusercontent.com/0b7ce1de726357abe2c154876ba6e76d6debfe4d28d5f4ea8f94a6b9e10ce1c8/68747470733a2f2f696d672e736869656c64732e696f2f7472617669732f6d61726b646f776e2d69742f6d61726b646f776e2d69742f6d61737465722e7376673f7374796c653d666c6174)](https://github.com/kaoken/markdown-it-php)[![composer version](https://camo.githubusercontent.com/137f7d54eb549444a71b3d879e59c456c4a4b2567f2000106a5e7e1372b1a9ae/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f76657273696f6e2d312e382e302d626c75652e737667)](https://github.com/kaoken/markdown-it-php)[![licence](https://camo.githubusercontent.com/84ba0b50ad44e854f0382b3a99afaef96f3d4db9e861686a3297ccd3bd397de7/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f6c6963656e63652d4d49542d626c75652e737667)](https://github.com/kaoken/markdown-it-php)[![laravel version](https://camo.githubusercontent.com/d058916961cef2354a195de55514023a4a3cf65da203d9780e5a7b805ec9d73d/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f4c61726176656c25323076657273696f6e2d3d352e382d7265642e737667)](https://github.com/kaoken/markdown-it-php)

Similar to the maintenance mode, **Private mode**can be invalidated if the user matches the permitted IP group, the password matched in the login form (when displayed), the `.env` file` APP_ENV=testing`Only.

composer
--------

[](#composer)

```
composer require kaoken/laravel5-private-mode
```

Added to `app\Http\Kernel.php`.
-------------------------------

[](#added-to-apphttpkernelphp)

```
    protected $middleware = [
        ...
        // add
        \Kaoken\Laravel5PrivateMode\PrivateModeMiddleware::class
    ],
```

Added to `.env`.
----------------

[](#added-to-env)

```
################################
################################
##
##  Private Mode Config
##
################################
################################
PRIVATE_MODE_VALID=true
PRIVATE_MODE_LOGIN_FORM=true
PRIVATE_MODE_IP=192.168.0.1/24,127.0.0.1
PRIVATE_MODE_PASSWORD=hoge-hoge

```

- `PRIVATE_SITE_VALID` represents validity / invalidity of this middleware.
    - `false` by default.
    - `true`, valid
    - `false`, invalid
- `PRIVATE_MODE_LOGIN_FORM` represents the hidden login form.
    - `false` by default.
    - If it is `true`, the login form is displayed, and if it matches the password of` PRIVATE_MODE_PASSWORD`, private mode will be invalidated even for IPs other than `PRIVATE_SITE_SAFE_IP`.
    - `false`, hidden
- `PRIVATE_MODE_PASSWORD`
    - default, it is a random string.
    - `PRIVATE_MODE_LOGIN_FORM`, If `true`, use it.
- `PRIVATE_SITE_SAFE_IP` adds an IP group for which private mode is invalidated.
    - default, `192.168.0.1/24`
    - Multiple entries can be added with a comma, and it corresponds to CIDR format.

Added to `resources\views\vendor`
---------------------------------

[](#added-to-resourcesviewsvendor)

Copy and paste `laravel5-private-mode\resources\views\private_mode` in this directory.

- `private_mode`
    - `layouts`
        - `app.blade.php` is the basic layout.
    - In the case of `PRIVATE_MODE_LOGIN_FORM=false`, `503.blade.php` is called when` PRIVATE_SITE_SAFE_IP` is not applicable IP group.
    - In the case of `PRIVATE_MODE_LOGIN_FORM=true`, `login.blade.php` is called when`PRIVATE_SITE_SAFE_IP` is not applicable IP group.

License
-------

[](#license)

**MIT**

###  Health Score

25

—

LowBetter than 37% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity7

Limited adoption so far

Community5

Small or concentrated contributor base

Maturity58

Maturing project, gaining track record

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

Unknown

Total

1

Last Release

3047d ago

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/6100263?v=4)[kaoken(kenji yasuda)](/maintainers/kaoken)[@kaoken](https://github.com/kaoken)

---

Tags

laravellaravel

### Embed Badge

![Health badge](/badges/kaoken-laravel5-private-mode/health.svg)

```
[![Health](https://phpackages.com/badges/kaoken-laravel5-private-mode/health.svg)](https://phpackages.com/packages/kaoken-laravel5-private-mode)
```

###  Alternatives

[livewire/volt

An elegantly crafted functional API for Laravel Livewire.

4195.3M84](/packages/livewire-volt)[gehrisandro/tailwind-merge-laravel

TailwindMerge for Laravel merges multiple Tailwind CSS classes by automatically resolving conflicts between them

341682.2k18](/packages/gehrisandro-tailwind-merge-laravel)[nickurt/laravel-akismet

Akismet for Laravel 11.x/12.x/13.x

97139.6k2](/packages/nickurt-laravel-akismet)[whitecube/laravel-timezones

Store UTC dates in the database and work with custom timezones in the application.

106106.2k](/packages/whitecube-laravel-timezones)[sbine/route-viewer

A Laravel Nova tool to view your registered routes.

57215.9k](/packages/sbine-route-viewer)[forxer/laravel-gravatar

A library providing easy gravatar integration in a Laravel project.

4235.6k](/packages/forxer-laravel-gravatar)

PHPackages © 2026

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