gocrew/laravel-reauth
Composer 安装命令:
composer require gocrew/laravel-reauth
包简介
Reauth users for sensitive parts of your app
README 文档
README
Re-Auth users for sensitive parts of your app.
Installation
Step 1: Composer
From the command line, run:
composer require gocrew/laravel-reauth
Step 2: Service Provider
For your Laravel app, open config/app.php and, within the providers array, append:
gocrew\LaravelReAuth\ServiceProvider::class
This will bootstrap the package into Laravel.
Step 3: The Middleware
In your app\Http\Kernel.php file, add the reauth middleware to the $routeMiddleware array.
protected $routeMiddleware = [ // ... 'reauth' => \gocrew\LaravelReAuth\Http\Middleware\Reauthenticate::class, // ... ];
Usage
Basic
Apply the middleware on a route you want to protect:
Route::get('settings', ['uses' => 'Controller@getSettings', 'middleware' => 'reauth']);
Done!
Advanced
If you need a more advanced setup, no problem. Everything is overwritable and everything is as modular as possible.
TODO
- advanced docs
- tests
License
The contents of this repository is released under the MIT license.
统计信息
- 总下载量: 359
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 4
- 点击次数: 0
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: MIT
- 更新时间: 2016-03-01