to a member function parameter() on array, в чем может здесь проблема?
public function updateGroup($id, Request $request)
{
$this->validate($request, [
'slug' => 'unique:groups',
'name' => 'required|max:255',
]);
$group = Group::findOrFail($id);
if (isset ($request->slug)) $group->slug = $request->slug;
$group->name = $request->name;
$group->save();
return response()
->json([
'updated' => true,
'message' => 'You have successfully update group!',
'group' => $group
]);
}
Покажи роут
$group->name = $request->input('name');
Обсуждают сегодня