canfone
2510
10
Laravel

Laravel 5.1 404 response to JSON

Posted 3 years ago by canfone

Hello,

I am trying to create a RESTful API using laravel 5.1, I'm trying to fetch a resource with an invalid ID, the result is 404 since it is not found, but my problem is the response is not in JSON form. Is there any way to convert the response into JSON?

Please sign in or create an account to participate in this conversation.

Reply to

Use Markdown with GitHub-flavored code blocks.