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
{{ message }}
This repository was archived by the owner on Jul 16, 2021. It is now read-only.
At the moment, when a 404 (or any renderable exception) is thrown, because it hasn't matched a route the web middleware does not get bound, therefore you won't have a session etc.
This creates quite a jarring experience if you have layouts / views that switch the navigation based on if the user is logged in etc. It'll make it look like the user has logged out when it displays the 404 page.
You can get around this by moving your web middleware to the global middleware array - but this means that all that middleware get's run, even on api requests. It makes the whole middleware group a bit pointless.
As it's a renderable page, wouldn't make sense to bind the web middleware?
The text was updated successfully, but these errors were encountered:
At the moment, when a 404 (or any renderable exception) is thrown, because it hasn't matched a route the
web
middleware does not get bound, therefore you won't have a session etc.This creates quite a jarring experience if you have layouts / views that switch the navigation based on if the user is logged in etc. It'll make it look like the user has logged out when it displays the 404 page.
You can get around this by moving your
web
middleware to the globalmiddleware
array - but this means that all that middleware get's run, even on api requests. It makes the whole middleware group a bit pointless.As it's a renderable page, wouldn't make sense to bind the
web
middleware?The text was updated successfully, but these errors were encountered: