-2
Good morning, you guys. I’m a beginner in Lisbon, I searched on the subject but nothing can help me(or that I have understood), so , who can give me a strength and thank.
LARAVEL 5.8 <<<<
I have a form that directs p/ controller
<form role="form" method="POST" action="{{route('pedidos.update',$edit->id)}}">
@method('PUT')
@csrf
and in the controller:
$rules=$request->validate([
'nome'=>'required|min:3|max:191',
'cpf'=>'required|max:11|unique:pedido_seja_socio,cpf,'.$request->id,
]);
if ($rules->fails()){
redirect(route('verifica.do'))->withErrors($rules)->withInput();
}
and returns the following error:
Symfony \ Component \ HttpKernel \ Exception \ MethodNotAllowedHttpException
The GET method is not supported for this route. Supported methods: POST.
if I comment (/**/) the validation code section, allows updating records.
Please post the route.php file with the route description for this controller. I believe it is the lack of setting the route to the screen where the form is being mounted. If you can also put the code that calls this view with the form. PS:I didn’t understand why they denied your question.
– Ademir Mazer Jr - Nuno
was exactly that @Ademirmazerjr-Nuno, was directing p/ route err, thank you very much.
– Rony Ortega