Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

支持使用注解设置控制器中间件 #3124

Closed
wants to merge 1 commit into from

Conversation

big-dream
Copy link
Contributor

<?php
namespace app\controller\merchant;

#[\think\attribute\Middleware(CheckLogin::class, only: ['index'], except: ['a'])]
class Index
{
  public function index() {}
  public function a() {}
}

@yunwuxin
Copy link
Member

注解功能在这个库
https://github.com/top-think/think-annotation

@big-dream big-dream closed this Feb 27, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants