Skip to content

Commit aa16043

Browse files
gazbenthilanga
authored andcommitted
Add getMiddleware function to Route class (dingo#1537)
* Add getMiddleware function to Route class The getMiddleware function is missing and reported here: flipboxstudio/lumen-generator#25 Also I think you have to be able to query the middlewares. If the function is not necessary and you can query the middlewares with another method, please write it in the comments. * Fix style * Fix style
1 parent d58ff5c commit aa16043

File tree

1 file changed

+10
-0
lines changed

1 file changed

+10
-0
lines changed

src/Routing/Route.php

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -533,4 +533,14 @@ public function secure()
533533
{
534534
return in_array('https', $this->action, true);
535535
}
536+
537+
/**
538+
* Return the middlewares for this route.
539+
*
540+
* @return array
541+
*/
542+
public function getMiddleware()
543+
{
544+
return $this->middleware;
545+
}
536546
}

0 commit comments

Comments
 (0)