The POST method is not supported for this route. Supported methods: PUT.

Created at 08-Mar-2022 , By samar

The POST method is not supported for this route. Supported methods: PUT.

Hello everyone, in this post we will examine how to solve the "The POST method is not supported for this route. Supported methods: PUT." programming puzzle.

Error: The POST method is not supported for this route. Supported methods: PUT occurs when you try to use another method in HTML form and created route with another method. You have created the route with PUT method in route file and try to submit the form with post method in Laravel. Method should be same in route and HTML form.
  • HTML Form with put method using @method in Laravel blade

    @method('PUT')
    
    //Example
    <form action="{{ route('user.update') }}" method="POST">
    @csrf
    @method('PUT')
    
    //routes\web.php
    Route::put('/update-profile', 'UserController@updateProfile')->name('user.update');
    

Back to code snippet queries related laravel

If you like what you are reading, please consider buying us a coffee ( or 2 ) as a token of appreciation.

Buy Me A Coffee

Don't forget to share this article! Help us spread the word by clicking the share button below.

We appreciate your support and are committed to providing you valuable and informative content.

We are thankful for your never ending support.