title: How to receive JSON POST request in Laravel
body: <p>I want to POST Fetch to my backend Laravel server from my React-Native mobile app.I dont know wihch parts is missing or what I'm doing wrong.. Here is the fetch : </p>
  
  <pre><code>fetch('http://example.com/react_test', {
              method: 'POST',
              headers: {
                  'Accept': 'application/json',
                  'Content-Type': 'application/json',
              },
              body: JSON.stringify({
                  name: inputName,
                  email: inputEmail,
                  phone: inputPhone
              }),
          }).then((response) =&gt; response.json())
              .then((responseJson) =&gt; {
                  alert(JSON.stringify(responseJson))
              }).catch((error) =&gt; {
                  alert(error);
          });
  </code></pre>
  
  <p>I receive data in my backend like this with POST route </p>
  
  <blockquote>
    <p>Route::post('/react_test', 'QuestionController@index');</p>
  </blockquote>
  
  <pre><code>public function index($request){
  
          $n = $request-&gt;input('name');
  
          DB::table('admin_panels')-&gt;insert(['discord' =&gt; $n, 'twitter' =&gt; 'anan']);
  
          return response('helal');
  
      }
  </code></pre>
  
  <p>and I get this error :</p>
  
  <blockquote>
    <p>Symfony \ Component \ HttpKernel \ Exception \
    MethodNotAllowedHttpException No message</p>
  </blockquote>