skip to Main Content

I’m using Laravel 8 and working with Localization trying to update with patch route but it’s showing error.
"The GET method is not supported for this route. Supported methods: PATCH."

My route is => `

Route::patch('/item/update/{item}', [SaleController::class, 'itemUpdate'])->name('item_update');

`

And the url generated is => http://project.test/en/sale/item/update/1/

What should I do now?

I’m trying to update with PATCH method with localization, but it’s not working.

2

Answers


  1. There are already answer for same problem
    The GET method is not supported for this route. Supported methods: PATCH.
    So please check your blade.php, something may be wrong there.

    Login or Signup to reply.
  2. That error isn’t related to laravel localization. When creating a request you need to define the http method too.
    Just putting an url in browser make a GET request.

    In html form you can determine the method in method attribute but only POST and GET are available. To define other method you can add a hidden input named _method:

    <form>
    <input name="_method" type="hidden" value="PATCH">
    </form>
    
    Login or Signup to reply.
Please signup or login to give your own answer.
Back To Top
Search