Laravel often returns an HTML response or redirect response on API routes, mostly if the response is an error one. However, it is quite easy to force Laravel to return JSON response in those cases.

continue reading on dev.to

⚠️ This post links to an external website. ⚠️