定制 riley/admin-approver 二次开发

按需修改功能、优化性能、对接业务系统,提供一站式技术支持

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

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

  1. Publish the config file:
php artisan vendor:publish --tag="admin-approver-config"
  1. Add the trait to your User model:
use Riley\AdminApprover\Traits\RequiresAdminApproval;

class User extends Authenticatable
{
    use RequiresAdminApproval;
}
  1. 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

GitHub 信息

  • Stars: 1
  • Watchers: 2
  • Forks: 0
  • 开发语言: PHP

其他信息

  • 授权协议: MIT
  • 更新时间: 2024-11-14