定制 mpemburn/rolevue 二次开发

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

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

mpemburn/rolevue

Composer 安装命令:

composer require mpemburn/rolevue

包简介

Vue.js user interface for Spatie Permission package.

README 文档

README

Latest Version MIT Licensed Total Downloads

About

The rolevue package provides a Vue.js-based user interface for the Spatie Permission package.

Installation

You can install this package via composer:

composer require mpemburn/rolevue

The package will automatically register the service provider RoleVueServiceProvider.

Next, you will need to publish the package in order to copy rolevue.php into your config directory:

php artisan vendor:publish --provider="Mpemburn\RoleVue\RoleVueServiceProvider"

Finally, in order to create the required tables, run:

php artisan migrate

Routes to the UI

When the Rolevue package is published, it creates routes to the Roles, Permissions, and User Roles pages. These are:

  • /roles
  • /permissions
  • /user_roles

You can add this snippet to your navigation view to access these:

<!-- Admin Dropdown -->
<div class="hidden sm:flex sm:items-center sm:ml-6 pt-1">
    <x-dropdown align="right" width="48">
        <x-slot name="trigger">
            <button class="flex items-center text-sm font-medium text-gray-500 hover:text-gray-700 hover:border-gray-300 focus:outline-none focus:text-gray-700 focus:border-gray-300 transition duration-150 ease-in-out">
                <div>Admin</div>

                <div class="ml-1">
                    <svg class="fill-current h-4 w-4" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 20 20">
                        <path fill-rule="evenodd" d="M5.293 7.293a1 1 0 011.414 0L10 10.586l3.293-3.293a1 1 0 111.414 1.414l-4 4a1 1 0 01-1.414 0l-4-4a1 1 0 010-1.414z" clip-rule="evenodd" />
                    </svg>
                </div>
            </button>
        </x-slot>

        <x-slot name="content">
            <x-dropdown-link :href="route('roles')" active="request()->routeIs('roles')">
                {{ __('Roles') }}
            </x-dropdown-link>
            <x-dropdown-link :href="route('permissions')" active="request()->routeIs('permissions')">
                {{ __('Permissions') }}
            </x-dropdown-link>
            <x-dropdown-link :href="route('user_roles')" active="request()->routeIs('user_roles')">
                {{ __('User Roles') }}
            </x-dropdown-link>
        </x-slot>
    </x-dropdown>
</div>

统计信息

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

GitHub 信息

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

其他信息

  • 授权协议: MIT
  • 更新时间: 2021-05-06

承接程序开发

PHP开发

VUE

Vue开发

前端开发

小程序开发

公众号开发

系统定制

数据库设计

云部署

网站建设

安全加固