Skip to content

[QUESTION] 请问 2.0 版本的 middleware 现在不支持通过 @inject 方式注入了? #1970

@yansongda

Description

@yansongda

Before you submit this issue, you has been search all existed issues and search the documentation

  • I've been search all existed issues
  • I've been read all documentation

Describe your question

在 1.1.x 版本中,middleware 是通过 @Inject 方式进行依赖注入的,昨天切换到 v2.0 版本,发现 $this->requestnull,通过 construct 方式注入解决问题

没有仔细看源码,先发出来,不知道是不是我的打开方式不对😆

感谢

Metadata

Metadata

Assignees

No one assigned

    Labels

    questionFurther information is requested

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions