2017 © Pedro Peláez
 

library laravel5-private-mode

Available in laravel5 or higher, similar to maintenance mode.

image

kaoken/laravel5-private-mode

Available in laravel5 or higher, similar to maintenance mode.

  • Tuesday, January 9, 2018
  • by kaoken
  • Repository
  • 1 Watchers
  • 0 Stars
  • 14 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 0 Forks
  • 0 Open issues
  • 6 Versions
  • 0 % Grown

The README.md

laravel5-private-mode

Build Status composer version licence laravel version, (*1)

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 fileAPP_ENV=testingOnly., (*2)

composer

composer require kaoken/laravel5-private-mode

Added to app\Http\Kernel.php.

``` php protected $middleware = [ ... // add \Kaoken\Laravel5PrivateMode\PrivateModeMiddleware::class ],, (*3)



## 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, (*4)

```, (*5)

  • 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 ofPRIVATE_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

Copy and paste laravel5-private-mode\resources\views\private_mode in this directory., (*6)

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

License

MIT, (*7)

The Versions

09/01 2018

dev-master

9999999-dev https://github.com/kaoken/laravel5-private-mode

Available in laravel5 or higher, similar to maintenance mode.

  Sources   Download

MIT

The Requires

 

laravel

09/01 2018

1.2.1

1.2.1.0 https://github.com/kaoken/laravel5-private-mode

Available in laravel5 or higher, similar to maintenance mode.

  Sources   Download

MIT

The Requires

 

laravel

30/08 2017

1.2.0

1.2.0.0 https://github.com/kaoken/laravel5-private-mode

Available in laravel5 or higher, similar to maintenance mode.

  Sources   Download

MIT

The Requires

 

laravel

20/07 2017

1.0.1

1.0.1.0 https://github.com/kaoken/laravel5-private-mode

Available in laravel5 or higher, similar to maintenance mode.

  Sources   Download

MIT

The Requires

 

laravel

04/05 2017

0.1.3

0.1.3.0 https://github.com/kaoken/laravel5-private-mode

Available in laravel5 or higher, similar to maintenance mode.

  Sources   Download

MIT

The Requires

 

laravel

03/05 2017

0.1.2

0.1.2.0 https://github.com/kaoken/laravel5-private-mode

Available in laravel5 or higher, similar to maintenance mode.

  Sources   Download

MIT

The Requires

 

laravel