Skip to content

Class Middleware with Parameters and DI #1232

Answered by MichalLytek
tzarger asked this question in Q&A
Discussion options

You must be logged in to vote

I am not able to register a function, only classes in TSyringe.

You would get only single instance from container, while you need multiple because of the custom parameters you provide ('Hello', 'World').

Replies: 1 comment 3 replies

Comment options

You must be logged in to vote
3 replies
@tzarger
Comment options

@MichalLytek
Comment options

@tzarger
Comment options

Answer selected by tzarger
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants