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
The idea behind the OneOfMiddleware is that one of the provided $middlewares must be successful for it to pass. So in case of the example either the request must be from a authenticated Passport client or authenticated by web. However when using the OneOfMiddleware I get the below error. It is already thrown on the first line of the middleware.
TypeError: Illegal offset type in isset or empty in file /home/cadixcas/domains/dev.cadixcas.nl/public_html/vendor/laravel/framework/src/Illuminate/Routing/Router.php on line 1316
That points to the following:
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.
-
I have the following middleware:
Usage:
The idea behind the
OneOfMiddleware
is that one of the provided$middlewares
must be successful for it to pass. So in case of the example either the request must be from a authenticated Passport client or authenticated by web. However when using theOneOfMiddleware
I get the below error. It is already thrown on the first line of the middleware.Is is possible to make a one of many middleware? If so how can I prevent the thrown error?
This question is also asked on StackOverflow.
Beta Was this translation helpful? Give feedback.
All reactions