search

Home  >  Q&A  >  body text

Fix "The GET method for this route is not supported. Supported methods: POST" error

<p>The GET method for this route is not supported. Supported methods: POST. <br /><br />php artisan route:cache php artisan route:clear How long does it take to execute this command? I need a solution to this error<br /><br />I need a solution to this error</p><p><br /></p>
P粉044526217P粉044526217502 days ago654

reply all(1)I'll reply

  • P粉635509719

    P粉6355097192023-08-09 19:10:03

    When you use a GET type route in the routes/web.php file, in the form using the method type "POST", it will appear an error of "GET method not supported", because the front-end submission type and There is a conflict between route types.

    Try converting your routes in routes/web.php:

    Route::get('/some-url', 'NameOfController@NameOfFunction');

    Then

    Route::post('/some-url', 'NameOfController@NameOfFunction');

    reply
    0
  • Cancelreply