iutrace/laravel-abilities
Composer 安装命令:
composer require iutrace/laravel-abilities
包简介
Easily add abilities business logic to your models
README 文档
README
A convenient way to encapsulate model conditions business logic
Laravel Gates are an excellent way to separate logic of access and permissions from models, but if we need to separate only models conditions not related to users (ex: if is valid to Publish a Post at certain state regardless of user)
This package adds a layer on top of laravel Gates, so first "ability" validity is checked then user access and permission is checked though normal laravel Gates if present.
Also, this package adds abilities and policies attributes to your models through HasHabilities trait, useful if you need available "actions" at frontend.
Installation
$ composer require iutrace/laravel-abilities
Usage
统计信息
- 总下载量: 10
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 0
- 点击次数: 0
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: MIT
- 更新时间: 2021-10-30