"Since I won't be using the web route so I decided to create a global JsonRequestMiddleware.... " It works great even when the app has web route (it does not affect the web route) - IFF you add it to protected
$middlewareGroups = [ 'api' => [ // here ], ]
instead of $middleware in the Kernel.php file
$middleware
Thank you for your feedback
Some comments have been hidden by the post's author - find out more
Are you sure you want to hide this comment? It will become hidden in your post, but will still be visible via the comment's permalink.
Hide child comments as well
Confirm
For further actions, you may consider blocking this person and/or reporting abuse
We're a place where coders share, stay up-to-date and grow their careers.
"Since I won't be using the web route so I decided to create a global JsonRequestMiddleware.... " It works great even when the app has web route (it does not affect the web route) - IFF you add it to protected
instead of
$middlewarein the Kernel.php fileThank you for your feedback