I'm new to laravel. I'm developing a web application using laravel 5.4. this app has an API also to communicate with mobile apps (these routs are inside routs/api).
My question is how to track token mismatch error and return a 401 with json msg. Now what's happening is whenever a request comes to api with invalid or no token, it's route back to login page.
This happens as the web app is configured to do so when user try to access a page without logging in.
I tried the exception/handle/render function but both exception are same type so couldn't differentiate.
(Both api and web app is in one laravel application)
via Chebli Mohamed
Aucun commentaire:
Enregistrer un commentaire