title: Laravel Post Request empty Request parameters
body: <p>When I post to my API endpoint with postman or my application the <code>request</code> parameter is an empty array.</p>
  <p>With other controllers post requests work fine and the <code>request</code> param gets handled well.
  Only with my order controller does my post body not get processed.</p>
  <p>I haven't made any changes and reverting to an older commit also did not help.</p>
  <p>I'm at the point where I have no clue why it doesn't accept the JSON body.</p>
  <p><strong>Controller</strong></p>
  <pre><code>public function createOrder(Request $request)
  {
      return $request-&gt;product_id;
  }
  </code></pre>
  <p><strong>POST body</strong> | <em>Raw JSON</em></p>
  <pre><code>{
      &quot;product_id&quot;: 4
  }
  </code></pre>
  <p><strong>Response</strong> <em>response is an empty array []&quot;</em></p>
  <p>I've tried to print the <code>$request</code> and I got this as response</p>
  <pre><code>POST /api/order/post HTTP/1.1
  Accept:          application/json
  Accept-Encoding: gzip, deflate, br
  Authorization:   Bearer.{token}
  Cache-Control:   no-cache
  Connection:      keep-alive
  Content-Length:  20
  Content-Type:    
  Cookie:          XSRF-TOKEN={Token}%3D%3D; laravel_session=%3D%3D
  Host:            backend.host
  User-Agent:      PostmanRuntime/7.22.0
  Cookie: XSRF-TOKEN==={token}; laravel_session={Token}
  
  {
      &quot;product_id&quot;: 4
  }
  </code></pre>
  <p>My post body is visible then so I'm confused why it's not showing</p>
  <p><strong>What I expect and what I get</strong></p>
  <p>I expect the request to return the value of my JSON body</p>
  <p>what is happening nothing is returned</p>
  <p><strong>Note:</strong> I've recently added passport, but it was working fine last time I used this endpoint after adding <code>laravel</code></p>
  <p><strong>Working controller</strong></p>
  <pre><code>public function store(Request $request)
  {
      return $request;
  }
  </code></pre>
  <p><strong>Api routes</strong></p>
  <pre><code>Route::post('order/create', 'OrderController@createOrder');
  Route::post('product/create', 'ProductController@store');
  </code></pre>
  <p>If I do <code>echo $request</code> in controller i see that there are data in the request, but I think that format is not good:</p>
  <pre><code>POST /api/messages HTTP/1.1
  Accept: */*
  Accept-Encoding: gzip, deflate, br
  Authorization: Bearer 5|ibun75O2SNnZoT2W5Rk0KQox70wBxKN4xIIrq0sQ
  Cache-Control: no-cache
  Connection: keep-alive
  Content-Length: 522
  Content-Type: application/json
  Host: localhost:8000
  User-Agent: PostmanRuntime/7.26.10
  
  {
      &quot;text&quot; : &quot;Molestiae dolor non eaque aut sapiente maiores. Aut voluptates nesciunt. Cum distinctio quisquam qui vitae eos
  asperiores.
  
  Nihil iste quia. Voluptate deleniti ipsam voluptas alias similique doloremque. Ratione alias iste voluptatem quis. Quis
  quia quo sequi minus quod voluptate cum similique dolor.
  
  Maxime enim aut. Eius ea doloribus. Quaerat dolor libero ipsum. Delectus atque esse ipsam est.&quot;,
      &quot;imageLink&quot; : &quot;http://placeimg.com/640/480/abstract&quot;,
      &quot;typeID&quot; : &quot;232&quot;,
      &quot;answerTypeID&quot; : &quot;919&quot;
  }
  </code></pre>