定制 msr/laravel-permission-block 二次开发

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

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

msr/laravel-permission-block

最新稳定版本:v1.0.1

Composer 安装命令:

composer require msr/laravel-permission-block

包简介

assign and block Permission handling for Laravel 8.0 and up

README 文档

README

About

This package is forked from laravel-permission developed by spatie

What It Different?

In additional main package, this package allows you to block user from permissions

Once installed you can do stuff like this:

$user->blockedPermissions // all permissions are blocked for user

// Block user from permission
$user->blockFromPermission('edit articles');
$user->blockFromPermission(['edit articles','view post']);

$user->hasBlockFromPermission('edit articles'); // return true
$user->hasDirectPermission('edit articles'); // return false
$user->hasPermissionTo('edit articles'); // return false
$user->can('edit articles'); // return false

$user->hasBlockFromAnyPermission(['edit article','view post']) // return true if any of passing permissions array are blocked

$user->unblockFromPermission('view post')

Changelog

Please see CHANGELOG for more information what has changed recently.

Testing

composer test

Security

If you discover any security-related issues, please email mahdi.msr4@gmail.com.

License

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

统计信息

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

GitHub 信息

  • Stars: 2
  • Watchers: 0
  • Forks: 1824
  • 开发语言: PHP

其他信息

  • 授权协议: MIT
  • 更新时间: 2023-06-29

承接程序开发

PHP开发

VUE

Vue开发

前端开发

小程序开发

公众号开发

系统定制

数据库设计

云部署

网站建设

安全加固