riley/admin-approver
最新稳定版本:v1.1.0
Composer 安装命令:
composer require riley/admin-approver
包简介
Laravel package to manage admin approval flow for new users
README 文档
README
A Laravel package that implements an admin approval flow for new user registrations.
Installation
composer require riley/admin-approver
Configuration
- Publish the config file:
php artisan vendor:publish --tag="admin-approver-config"
- Add the trait to your User model:
use Riley\AdminApprover\Traits\RequiresAdminApproval; class User extends Authenticatable { use RequiresAdminApproval; }
- Run migrations:
php artisan migrate
Usage
Add the middleware to your routes:
Route::middleware(['admin.waiting'])->group(function () { // Protected routes that require admin approval });
Configuration Options
return [ 'home' => '/', // Redirect path after approval 'waiting_route' => '/waiting-admin-approve', // Waiting page route 'middleware' => ['web', 'auth'], // Default middleware 'routes' => [ 'enabled' => true, 'prefix' => 'admin', 'middleware' => ['web', 'auth'] ], 'views' => [ 'layout' => 'layouts.app' // Your layout file ] ];
统计信息
- 总下载量: 5
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 1
- 点击次数: 1
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: MIT
- 更新时间: 2024-11-14