I have route in group 'prefix'=>'admin' in web.php
Route::post('/slideUpdate/{id}','SlideController@postSlideUpdate')
In Add.vue i call function update() in methods
axios.patch(`/admin/slideUpdate/${this.list.id}`,this.$data.list)
In SlideController i have function
public function postSlideUpdate(Request $request,$id)
{
$product = Slide::find($request->id);..$product->save();
}
When i click button @click="update"i get error
PATCH http://minhquanbicycle.com/admin/slideUpdate/1 405 (Method Not Allowed)
Thanks
axios.postinstead ? Are you sure this`/admin/slideUpdate/${this.list.id}`make right path ?patchand receiving it inpost, update your route aswell toPUTorPATCHinstead post