close

[Solved] The POST method is not supported for this route. Supported methods: GET, HEAD. Laravel

Hello Guys, How are you all? Hope You all Are Fine. Today I get the following error The POST method is not supported for this route. Supported methods: GET, HEAD. Laravel in php. So Here I am Explain to you all the possible solutions here.

Without wasting your time, Let’s start This Article to Solve This Error.

How The POST method is not supported for this route. Supported methods: GET, HEAD. Laravel Error Occurs?

Today I get the following error The POST method is not supported for this route. Supported methods: GET, HEAD. Laravel in php.

How To Solve The POST method is not supported for this route. Supported methods: GET, HEAD. Laravel Error ?

  1. How To Solve The POST method is not supported for this route. Supported methods: GET, HEAD. Laravel Error ?

    To Solve The POST method is not supported for this route. Supported methods: GET, HEAD. Laravel Error In my case just run the command and worked like charm.
    php artisan route:clear

  2. The POST method is not supported for this route. Supported methods: GET, HEAD. Laravel

    To Solve The POST method is not supported for this route. Supported methods: GET, HEAD. Laravel Error In my case just run the command and worked like charm.
    php artisan route:clear

Solution 1

There are multiple ways you can handle this:

  1. If you insist on using PUT you can change the form action to POST and add a hidden method_field that has a value PUTand a hidden csrf field (if you are using blade then you just need to add @csrf_field and {{ method_field('PUT') }}). This way the form would accept the request.
  2. You can simply change the route and form method to POST. It will work just fine since you are the one defining the route and not using the resource group.

Solution 2

In my case just run the command and worked like charm.

php artisan route:clear

Summery

It’s all About this issue. Hope all solution helped you a lot. Comment below Your thoughts and your queries. Also, Comment below which solution worked for you? Thank You.

Also, Read

Leave a Comment