承接 tonystore/livewire-permission-manager 相关项目开发

从需求分析到上线部署,全程专人跟进,保证项目质量与交付效率

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

tonystore/livewire-permission-manager

Composer 安装命令:

composer require tonystore/livewire-permission-manager

包简介

Package that provides a graphical interface to manage roles and permissions.

README 文档

README

Latest Stable Version Packagist Downloads License PHP Version Require

Package that provides a graphical interface to manage roles and permissions.

REQUIREMENTS

Version Compatibility Livewire

Livewire Livewire Permission Manager
2.x 0.2.x
3.x 0.3.x

INSTALLATION VIA COMPOSER

Step 1: Composer

Run this command line in console.

composer require tonystore/livewire-permission-manager

Step 2: Publish Assets

Publish Config File

php artisan vendor:publish --provider="Tonystore\LivewirePermission\LivewirePermissionProvider" --tag=config-permission

Publish Views

Publish the views only if any modifications to the interfaces are required.

php artisan vendor:publish --provider="Tonystore\LivewirePermission\LivewirePermissionProvider" --tag=views-permission

Publish Migrations

Publishes migrations, only if a new column is created for the detail of a role or permission.

php artisan vendor:publish --provider="Tonystore\LivewirePermission\LivewirePermissionProvider" --tag=migrations-permission

Publish Lang

Publish the translations in case you wish to modify any of them.

php artisan vendor:publish --provider="Tonystore\LivewirePermission\LivewirePermissionProvider" --tag=langs-permission

Usage

By default, Tailwind is used to create the role and permissions management interface, but you can also choose the Bootstrap theme.

<?php
return [
	/*
	 * Supported Theme: 'tailwind, bootstrap',
	 */
	'theme'  =>  'tailwind',
];

Configure templates

You have 2 alternatives to use with this package, using the blade directives or using the laravel components.

<?php
return [
	'blade-template'  => [
		'type'  =>  'components', //Supported Type: 'components, directives'
		'component'  =>  'AppLayout', //type: components
		'directives'  => [ //type: directives
			'extends'  =>  'layouts.app',
			'section-content'  =>  'content',
		],
	],
];

Includes the component that contains the scripts and styles needed for the graphic interface.

<head>
    ....
       <x-permissions::styles />
    ....
</head>
 <body> 
    ...
    @livewireScripts
    
    <script src="//cdn.jsdelivr.net/npm/sweetalert2@10"></script>
    //INSERT COMPONENT
       <x-permissions::scripts />
  
 </body>

To remove a role, SweetAlert is used, so you must have it in your design, and it must be before the script component. Note that you must import it after the Livewire scripts.

Select a Modal design

You will be able to select among the types of manners that the package will have, at the moment only a list type model is available, which is configured here:

<?php
return [
	'modals'  => [
		'role'  =>  'list'
	],
];

Customized page

Here you define the array of numbers for the paging options.

<?php
   'paginate' => [
        'perPages' => [
            10, 25, 50, 100, 200
        ]
    ]

Change tables name

Here you assign the names of the tables to be able to run the migration. By default it uses the tables listed in the Laravel Permission package.

<?php
return [
	'tables'  => [
		'roles'  =>  config('permission.table_names.roles', 'roles'),
		'permissions'  =>  config('permission.table_names.permissions', 'permissions'),
	],
];

Exclude roles

Here you define the roles you want to exclude from Livewire queries for display and modification. By default you will have an empty array.

<?php
return [
	'roles'  => [
		'excludes'  => []
	]
];

Column name

Here you define the name of the new column that will be created in the roles and permissions table defined, with this you can add a description to each role or permission created, by default the name of the column is description. By default the name.

<?php
return [
	'column_name'  => [
		'add_column' => false,
		'description'  =>  null,
	],
];

If you mark as true the option to add the description column, you must have previously generated that column in the respective database table.

Route

Set your own prefix and midlewares and name for the role management path and permissions. By default you will have the following:

<?php
return [
	'route'  => [
		'middleware'  => [
			'web',
			'auth'
		],
		'prefix'  =>  'admin',
		'name'  =>  'permission.index',
		'url'  =>  '/roles/manager'
	],
];

Now, once everything is configured, you will be able to access the path to manage your roles.

http://localhost/admin/roles/manager

tonystore/livewire-permission-manager 适用场景与选型建议

tonystore/livewire-permission-manager 是一款 基于 Blade 开发的 Composer 扩展包,目前已累计 1.05k 次下载、GitHub Stars 达 17, 最近一次更新时间为 2021 年 10 月 30 日, 在 PHP 生态内属于活跃度较高的组件。

它主要适用于以下技术方向: 「laravel」 「permission」 「roles」 「permissions」 「livewire」 「tonystore」 等业务场景。在实际项目中,围绕这些方向常见需要落地的问题包括:接口对接、性能调优、并发安全、与既有框架(Laravel / ThinkPHP / Yii / Webman 等)的兼容适配,以及生产环境的日志埋点与稳定性保障。

我们在过去多个企业项目中使用过 tonystore/livewire-permission-manager 或与其功能相近的方案,如果你在选型或落地过程中遇到问题,例如 版本兼容、二次改造、私有化封装、与内部系统对接、生产 BUG 排查,欢迎联系我们协助评估。

围绕 tonystore/livewire-permission-manager 我们能提供哪些服务?
定制开发 / 二次开发

基于 tonystore/livewire-permission-manager 在你已有业务上做功能扩展、字段裁剪、UI 适配、与内部账号 / 权限 / 日志系统的深度对接。

BUG 修复 & 性能优化

线上偶发问题、内存泄漏、慢查询、并发异常等排查修复;针对高流量场景做缓存、队列、索引层面的调优。

项目外包 & 长期维护

承接完整的项目从需求 → 设计 → 开发 → 上线 → 长期运维;也可按月提供技术保姆服务。

yvsm@zunyunkeji.com QQ:316430983 微信:yvsm316 西安尊云信息科技 · 专注 PHP / Go / 分布式系统研发

统计信息

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

GitHub 信息

  • Stars: 17
  • Watchers: 2
  • Forks: 3
  • 开发语言: Blade

其他信息

  • 授权协议: MIT
  • 更新时间: 2021-10-30