DEV Community

Chidiebere Chukwudi
Chidiebere Chukwudi

Posted on


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

Quick Solution and straight to the point no bulky intro(this is my intro though)

Solution: If you are trying to make an update request and you are using laravel route resource to manage your routing, this solution should work for you

<form action="{{ route('article.update', $article->id) }}" method="POST">
Enter fullscreen mode Exit fullscreen mode

Noticed the @method('PUT') ? This is because laravel resource route natviely uses the "PUT" verb for handling your form actions.

If you defined the route by yourself with out the route resource, you can make use of the "POST" verb and it will definitely work!

For example:

<form action="/articles/update/{{$article->id}}" method="POST">
Enter fullscreen mode Exit fullscreen mode


Top comments (0)

We want your help! Become a Tag Moderator.
Check out this survey and help us moderate our community by becoming a tag moderator here at DEV.