I have a form where the user can update the fields of the given ID, also you have other fields you can't modify but are filled (the reason using "Form::model"). The problem, I cant change the "method" to "PUT", it looks like is forced to be "POST" and the Route->resource->instituciones can't catch it. The form:
{{ Form::model($institucion, array('route' => array('instituciones.update', $institucion->id_institucion), 'method' => 'ALWAYSPOST')) }}
shows always "POST"
<form accept-charset="UTF-8" action="http://localhost/geseduc/public/instituciones/1" method="POST">
I know I can change the route or the form to Form::open, but for me looks to be inconsistent because the "resource" are the native way you can route, and "Form::model" is the native way you can fill into the form. May I'm doing wrong something??
Ok, don't know why it doesn't worked before, but now I tried again and figured a hidden input!!
<input type="hidden" value="PUT" name="_method">
Solved! XD
Sign in to participate in this thread!
The Laravel portal for problem solving, knowledge sharing and community building.
The community