php - Laravel 5 MethodNotAllowedHttpException -
i using form patch method , have button link(since have submit button , using same form both store , update) as
<a class="btn btn-default" href="{{ url::to( 'pages/edit/' . $vehicle -> id) }}">edit</a> and route
route::patch('/pages/edit/{id}', ['uses' => 'vehicleprocesscontroller@update']); controller
public function update($id) { $vehicle = vehicle::find($id); $input = input::all(); $vehicle->update($input); return $input; } when click link $input returns null , getting
methodnotallowedhttpexception
i trying familiar l5, how can fix ? appreciated.
your <a> link trigger get request, not patch request. can use js have trigger patch request, or use <button> or <input type="submit"> issue one.
Comments
Post a Comment