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
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
-
I've found it's easy to inadvertently overwrite the middleware config using the fluent interface:
Middleware config now uses the function
withMiddleware()
Eg (from Laravel docs) :As
Application::configure
uses a fluent interface I originally added more middleware like this:The causes a new config array to be generated, overwriting the first set of middleware. No errors, no warnings, your middleware will just disappear.
I would expect it to merge the two configs, not overwrite, or at least warn you in the docs!
The correct way (of course) is to ensure there is only one config block:
Beta Was this translation helpful? Give feedback.
All reactions