feat(admin): add middleware annotation for login exemption

- Add MiddlewareAnnotation to CheckLogin middleware for login exemption
- Implement IGNORE_LOGIN constant in MiddlewareAnnotation
- Use MiddlewareAnnotation in Goods controller for login exemption

Signed-off-by: wolfcode <37436228+wolf-leo@users.noreply.github.com>
This commit is contained in:
wolfcode
2025-01-12 18:12:28 +08:00
parent 936cb56c7f
commit 7603cdfa7e
3 changed files with 17 additions and 0 deletions

View File

@@ -10,6 +10,9 @@ final class MiddlewareAnnotation
/** 过滤日志 */
const IGNORE_LOG = 'LOG';
/** 免登录 */
const IGNORE_LOGIN = 'LOGIN';
public function __construct(public string $type = '', public string|array $ignore = '')
{
}