Files
EasyAdmin8/app/admin/service/annotation/NodeAnnotation.php
wolfcode 30c7615e53 feat(auth): use attribute for ignore node
- Add NodeAnnotation attribute to filter ignore nodes
- Update Goods controller to use NodeAnnotation for ignore nodes
- Modify Node service to handle new attribute-Enhance AdminController with ignoreNode property
2025-01-07 11:12:16 +08:00

25 lines
534 B
PHP

<?php
namespace app\admin\service\annotation;
use Attribute;
/**
* action 节点注解类
*/
#[Attribute(Attribute::IS_REPEATABLE | Attribute::TARGET_METHOD| Attribute::TARGET_PROPERTY)]
final class NodeAnnotation
{
/** 过滤节点 */
const IGNORE_NODE = 'NODE';
/**
* @param string $title
* @param bool $auth 是否需要权限
* @param string|array $ignore
*/
public function __construct(public string $title = '', public bool $auth = true, public string|array $ignore = '')
{
}
}