I want to update my data with Laravel so I used the PATCH method but I have an error :
Symfony\Component\HttpKernel\Exception\MethodNotAllowedHttpException
The GET method is not supported for route checkPermissions. Supported methods: PATCH.
I used PATCH method like this :
My view :
<form action="/checkPermissions" method="PATCH">
@method('PATCH')
@csrf
//My fields are here
</form>
My route :
Route::patch('/checkPermissions', [MyController::class, 'check']);
(I already check this Question The GET method is not supported for this route. Supported methods: PATCH, but there is no answers that solve the problem)
If you need to see more code or files just ask me.
Thanks for your help !
>Solution :
Form actions are only supported to get and post actions. Change the form action to post and you are already defined patch within the @method directive.