You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Currently chaining ->middleware() on route definitions works differently depending on where in the chain it is. Sometimes it merges the args with the previous middlewares, other times it overrides the previous ones. See the figure, I chain ->middleware('a')->middleware('b) in all three cases, but the outcomes are different.
Is there a reason why it has to override the previous middlewares for groups and resources? Or can we maybe make it more consistent at least for 11.x?
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
Uh oh!
There was an error while loading. Please reload this page.
-
Currently chaining ->middleware() on route definitions works differently depending on where in the chain it is. Sometimes it merges the args with the previous middlewares, other times it overrides the previous ones. See the figure, I chain ->middleware('a')->middleware('b) in all three cases, but the outcomes are different.
Is there a reason why it has to override the previous middlewares for groups and resources? Or can we maybe make it more consistent at least for 11.x?
Beta Was this translation helpful? Give feedback.
All reactions