JSON request to Laravel RESTFull API end point

If you want to send JSON request to Laravel RESTFull API end point, you can set he header as shown in the following image. We are using POSTman to show he example

Set Accept to application/json

$request->expectsJson

With above request you can use the following code in your project