承接 dvlpp/privat 相关项目开发

从需求分析到上线部署,全程专人跟进,保证项目质量与交付效率

邮箱:yvsm@zunyunkeji.com | QQ:316430983 | 微信:yvsm316

dvlpp/privat

最新稳定版本:v1.0

Composer 安装命令:

composer create-project dvlpp/privat

包简介

Simple private access package for Laravel.

README 文档

README

This package is deprecated, a backward compatible v2 version of it is available here: code16/privat

Privat

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

Screenshot

Usage

Install with composer

composer require dvlpp/privat

Add Privat Service Provider (except for Laravel 5.5+)

Add the following line in the providers section of your config/app.php file:

\Dvlpp\Privat\PrivatServiceProvider::class

Add Privat middleware in your project

Add the following line at the end of the $middleware array of the app/Http/Kernel file:

\Dvlpp\Privat\PrivatMiddleware::class

Set Privat config

First create the privat config file:

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

And then edit the new /config/privat.php accordingly (nothing fancy), or even better, add this keys in your .env file:

  • PRIVAT_RESTRICTED=true
  • PRIVAT_PASSWORD=mypassword

Exceptions

The except config param is meant to contain an array of excluded urls (those url won't be protected by Privat).

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

WTFPL

统计信息

  • 总下载量: 3.21k
  • 月度下载量: 0
  • 日度下载量: 0
  • 收藏数: 6
  • 点击次数: 0
  • 依赖项目数: 0
  • 推荐数: 0

GitHub 信息

  • Stars: 6
  • Watchers: 2
  • Forks: 2
  • 开发语言: PHP

其他信息

  • 授权协议: MIT
  • 更新时间: 2016-02-03