shanerbaner82/panel-roles 问题修复 & 功能扩展

解决BUG、新增功能、兼容多环境部署,快速响应你的开发需求

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

shanerbaner82/panel-roles

最新稳定版本:v0.0.3

Composer 安装命令:

composer require shanerbaner82/panel-roles

包简介

Filament Panel Roles is an intuitive way to ensure all users of a specified panel within Filament v3 is assigned a role during registration and has a specified role using Laravel Middleware.

README 文档

README

Filament Panel Roles

Filament Panel Roles

Filament Panel Roles is an intuitive way to ensure all users of a specified panel within Filament v3 is assigned a role during registration and has a specified role using Laravel Middleware.

Installation

 composer require shanerbaner82/panel-roles

Setup

Filament Panel Roles requires you to install Spatie's Laravel Permissions package. the minimum setup required is to:

  1. Install Spatie's package
  2. Add the RoleMiddleware to yourapp/Http/Kernel.php

Usage

Inside any of your Filament panels add the Panel Roles plugin and specify the role users will be assigned and must have in order to login.

use Shanerbaner82\PanelRoles\PanelRoles; class AdminPanelProvider extends PanelProvider { public function panel(Panel $panel): Panel { return $panel ... ->plugin(PanelRoles::make() ->roleToAssign('developer') ->restrictedRoles(['admin', 'developer']), ) } }

Technically you do not need to chain the registration() function on your panel, but if you do when a user registers they will be assigned the provided role.

Bonus

Watch LaravelOnline on YouTube to see how this plugin was created and to learn more about Laravel and Filament!

统计信息

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

GitHub 信息

  • Stars: 16
  • Watchers: 1
  • Forks: 4
  • 开发语言: PHP

其他信息

  • 授权协议: MIT
  • 更新时间: 2026-01-04

承接程序开发

PHP开发

VUE

Vue开发

前端开发

小程序开发

公众号开发

系统定制

数据库设计

云部署

网站建设

安全加固