/** * Update the specified resource in storage. * * @param \Illuminate\Http\Request $request * @param int $id * @return \Illuminate\Http\Response */ public function update(TypeFormRequest $request, Type $type) { // Update the $type $type->update($request->all()); flash()->success('Type has been updated'); return redirect('types'); }
public function update($id, TypeFormRequest $request) { $type = Type::find($id); $type->update(['type_name' => $request->input('type_name')]); return redirect()->route('admin.typeManagement'); }