定制 emptynick/voyager-permissions 二次开发

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

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

emptynick/voyager-permissions

Composer 安装命令:

composer require emptynick/voyager-permissions

包简介

Permission system for Voyager II using spatie/laravel-permission

README 文档

README

This plugin for Voyager II implements spaties laravel-permission to authorize actions and users.

Getting started

Require the package

First, require the plugin: composer require emptynick/voyager-permissions.

Run the installer

Run the installer by calling php artisan permissions:install.

Publishing migrations and config file

First the installer will publish a configuration file and migrations.
After that you will be asked if you want to migrate now.
If you want to change the published migrations select No and run the command again after you finished editing.

Add the HasRole Trait to your user model

The the installer will ask you to open your user model and add the trait Emptynick\Permissions\Traits\HasRoles:

<?php

namespace App\Models;

use Illuminate\Foundation\Auth\User as Authenticatable;
use Emptynick\Permissions\Traits\HasRoles;

class User extends Authenticatable
{
    use HasRoles;

    // ...
}

Add necessary permissions

In order to be allowed to open the permission manager, the installer will add some required permissions to your user.
Enter your user model (normally \App\Models\User) hit enter and enter the ID of your user.

Thats it! Now you are able to access the Permission page from the menu.

统计信息

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

GitHub 信息

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

其他信息

  • 授权协议: MIT
  • 更新时间: 2020-06-01

承接程序开发

PHP开发

VUE

Vue开发

前端开发

小程序开发

公众号开发

系统定制

数据库设计

云部署

网站建设

安全加固