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” width=”980″ height=”412″ class=”alignnone size-large wp-image-2619″ /></p>
<p>With above request you can use the following code in your project</p>
<p></p><!-- Crayon Syntax Highlighter v_2.7.2_beta -->

		<div id=

1
2
3
if ($request->expectsJson()) {
 
}