Package Data | |
---|---|
Maintainer Username: | kaoken |
Package Create Date: | 2017-05-03 |
Package Last Update: | 2019-06-10 |
Language: | PHP |
License: | MIT |
Last Refreshed: | 2024-11-19 03:22:02 |
Package Statistics | |
---|---|
Total Downloads: | 22 |
Monthly Downloads: | 0 |
Daily Downloads: | 0 |
Total Stars: | 0 |
Total Watchers: | 2 |
Total Forks: | 1 |
Total Open Issues: | 0 |
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 require kaoken/laravel5-private-mode
app\Http\Kernel.php
. protected $middleware = [
...
// add
\Kaoken\Laravel5PrivateMode\PrivateModeMiddleware::class
],
.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
, validfalse
, invalidPRIVATE_MODE_LOGIN_FORM
represents the hidden login form.
false
by default.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
, hiddenPRIVATE_MODE_PASSWORD
PRIVATE_MODE_LOGIN_FORM
, If true
, use it.PRIVATE_SITE_SAFE_IP
adds an IP group for which private mode is invalidated.
192.168.0.1/24
resources\views\vendor
Copy and paste laravel5-private-mode\resources\views\private_mode
in this directory.
private_mode
layouts
app.blade.php
is the basic layout.PRIVATE_MODE_LOGIN_FORM=false
, 503.blade.php
is called when PRIVATE_SITE_SAFE_IP
is not applicable IP group.PRIVATE_MODE_LOGIN_FORM=true
, login.blade.php
is called whenPRIVATE_SITE_SAFE_IP
is not applicable IP group.MIT