this is my html form
<form class="form-horizontal" action="" method="post">
<input name="method" type="hidden" value="patch"/>
<div class="form-group">
<input name="_token" type="hidden" value=""/>
here is route:
Route::patch('blog/{id}','BlogController@update');
Controller :
public function update(Request $request,$id){
$input = $request->all();
$blog =findOrFail($id);
Blog::update($input);
//var_dump($input);
return back();
}
can you please show me where is the issue.
via Chebli Mohamed
Aucun commentaire:
Enregistrer un commentaire