title: How to fix 'The GET method is not supported for this route. Supported methods: POST'
body: <p>I'm developing a REST service with Laravel to consume it from a mobile app. It works properly on local, but not on hosting. After several tries, I developed a basic example to test the POST method, but it returns the same error.</p>
  
  <p><strong>api.php</strong> file</p>
  
  <pre class="lang-php prettyprint-override"><code>Route::post('/test', 'testController@test') ;
  </code></pre>
  
  <p><strong>testController.php</strong> file</p>
  
  <pre class="lang-php prettyprint-override"><code>namespace App\Http\Controllers;
  
  use Illuminate\Http\Request;
  
  class testController extends Controller
  {
      //
      public function test(Request $request)
      {
          return response()-&gt;json(['mensaje' =&gt; 'POST access successful']); 
      }
  }
  </code></pre>
  
  <p>POST request is always returning the same error, and I am using POST on petition: <strong>405 Method Not Allowed. The GET method is not supported for this route. Supported methods: POST</strong>.</p>
  
  <p><a href="https://i.stack.imgur.com/Zikei.png" rel="nofollow noreferrer">POSTMAN request</a></p>
  
  <p>I have investigated this topic and I  have read it could be due CORS. So, I have installed <a href="https://github.com/spatie/laravel-cors" rel="nofollow noreferrer">spatie/laravel-cors</a> with its default config, but POSTMAN is still showing the same error. Some help, please?</p>
  
  <p><strong>SOLVED:</strong>
  Thanks all! Definitely, it was not a CORS problem. My hosting server makes a redirect by default, losing POST parameters in the way.</p>