定制 chilly2go/nova-permissions 二次开发

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

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

chilly2go/nova-permissions

最新稳定版本:v1.0.3

Composer 安装命令:

composer require chilly2go/nova-permissions

包简介

Nova Permissions tool based on spatie permissions

README 文档

README

Nova Permissions tool based on spatie permissions

I liked how GrapheneICT/nova-permissions looked. But it lacked nova 4 support. So here is what I think might be an "ok" take on working with Nova 4 and Spatie/Permissions v6.

Installation

You can install the package in to a Laravel app that uses Nova via composer:

composer require chilly2go/nova-permissions

Next up, you must register the tool with Nova. This is typically done in the tools method of the NovaServiceProvider. By adding the tool the included Field and Resources are being registered.

// in app/Providers/NovaServiceProvider.php

// ...

public function tools()
{
    return [
        // ...
        new \chilly2go\NovaPermissions\Tool,
    ];
}

Publishing assets

Database migrations

This migration adds a new column to the permissions table for grouping permissions. This is required for this package to work. It will initially iterate all permissions and try to set a reasonable default group based on the permission name.

php artisan vendor:publish --provider="chilly2go\NovaPermissions\ToolServiceProvider" --tag="migrations"

Config Files

This is optional and allows adjustments for Nova resource groups and translation prefix

php artisan vendor:publish --provider="chilly2go\NovaPermissions\ToolServiceProvider" --tag="config"

Translation

There is a translation file included that (by running the command below) will publish the translations to your projects lang folder. This is setup this way to allow easy enhancement for group name translations.

php artisan vendor:publish --provider="chilly2go\NovaPermissions\ToolServiceProvider" --tag="lang"

Usage

By adding the tool in your ServiceProvider the Field and Resources are being registered. Resources will be shown in the Nova sidebar based on the configuration in the config file.

I have not yet found a way to set displayInNavigation from a function call (config('...')) so those two settings are without a function.

Changelog

Please see CHANGELOG for more information on what has changed recently.

Contributing

Please see CONTRIBUTING for details.

Security

If you discover any security related issues, please email code@chilly2go.de instead of using the issue tracker.

Credits

License

The MIT License (MIT). Please see License File for more information.

统计信息

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

GitHub 信息

  • Stars: 0
  • Watchers: 0
  • Forks: 0
  • 开发语言: Vue

其他信息

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

承接程序开发

PHP开发

VUE

Vue开发

前端开发

小程序开发

公众号开发

系统定制

数据库设计

云部署

网站建设

安全加固