I have a table showing a list of names, with an “edit” button and a hidden id value on the side. Pressing the "Edit" button will display the hidden identifier as the form value and display the edit page so that the user can change the data of this person. Pretty standard.
When editing details and presentation, I use a validator. If the check fails, she needs to return to the edit page and display the errors. The problem is that on the edit page, the identifier value was required via the POST method, but it seems that the GET method is used only for redirection, which leads to a "Controller error" error, since there is no "Get route" route setting.
Does anyone know how I can redirect back to the page via POST, not GET. Currently my code is as follows:
public function postEditsave(){
...
if ($validator->fails())
{
return Redirect::to('admin/baserate/edit')
->withErrors($validator)
->withInput();
}else{
...
thanks
james source
share