I have read laravel throwing MethodNotAllowedHttpException and I know that this error often appears when one is POSTing to a GET route, but I am really sure that I am POSTing to a POST route.
Also this does work on my locale Homestead version but its not working on my apache production server.
There is nothing in the Laravel log file.
This is the error:
If one takes a closer look there is GET
and POST
, I am not sure if something is wrong with the request:
This is start of the from from the blade file (I am not using JS, its a pure HTML based form):
<form action='/users/update/' method='post' id='contactForm'>
{{ csrf_field() }}
<h2>
@lang('list.memb_4')
<input type="submit" class="savebutton" id='contactButton' value="@lang('list.default_41')"></h2>
Any suggestion what could cause this error?
I had to change
<form action='/users/update/' method='post' id='contactForm'>
to
<form action='/users/update' method='post' id='contactForm'>
In my web.php
file I also use
Route::post('/users/update', 'UserController@update');
I don't know why - but on my test server Homestead this was no problem, but on my production server this is a problem.