I try desperately to modify my data with Laravel and Vuejs. I still get a 500 error.
My route :
Route::put('/settings/'.Spark::teamsPrefix().'/{team}/types/{type}', 'TypeController@update');
My controller :
public function update(Request $request, Type $type)
{
$type->name = $request->name;
$type->save();
}
My update() in Vue
update() {
axios.put(this.urlForUpdating, this.updateTypeForm)
.then(() => {
Bus.$emit('updateTypesConfiguration');
});
}
this.urlForUpdating
return :
http://myURL/settings/teams/53/types/19
(19 is the ID of the item I want to edit)
When I update, I have this error in my console :
PUT http://localhost:3000/settings/teams/53/types/19 500 (Internal Server Error)
Do you know how to solve my problem? Thank you !