Laravel 5.1 - Get injected controller middleware

Posted 3 years ago by roccobenditz

Maybe this is an easy one but i don't get it. When i receive my request object i can simply do something like

$request->route()->middleware();

to get all middlewares which were defined in routes.php as route parameters.

Maybe i miss the forest for the trees, but how the hell do i get the middleware which was injected in the controllers constructor method?

Thanks in advance.

Please sign in or create an account to participate in this conversation.

Reply to

Use Markdown with GitHub-flavored code blocks.