定制 i74ifa/role-craft 二次开发

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

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

i74ifa/role-craft

最新稳定版本:v1.1.4

Composer 安装命令:

composer require i74ifa/role-craft

包简介

automating role creation and permission management with Spatie/Laravel-Permission.

README 文档

README

Latest Version on Packagist Total Downloads GitHub Actions

Installation

composer require i74ifa/role-craft

optional

publish config

php artisan vendor:publish --tag=role-craft-config

Usage

Generate role and Permissions

php artisan role-craft:generate

this command will be generate all permissions and role-craft.default_role will be created if you want to change default role name, you can change it in config/role-craft.php after publish config

Sync permissions

php artisan role-craft:sync manager --all

this will be sync all permissions to manager role if it exists if not exists you want to use --create option

php artisan role-craft:sync manager --create

if you want to sync some role from models use --models option

php artisan role-craft:sync manager --models=User --models=Post

# OR Custom Directory
php artisan role-craft:sync manager --models=App\Models\Directory\User

Generate role if not exists

php artisan role-craft:sync manager --create

License

This package is released under the MIT license.

统计信息

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

GitHub 信息

  • Stars: 3
  • Watchers: 1
  • Forks: 1
  • 开发语言: PHP

其他信息

  • 授权协议: MIT
  • 更新时间: 2025-01-28