/** * Update the specified resource in storage. * * @param Request $request * @param int $id * @return Response */ public function update(AddMachineRequest $request, $id) { $machine = Machine::findOrFail($id); $machine->update($request->all()); return redirect('machines'); }
/** * Show the form for editing the specified resource. * * @param int $id * @return Response */ public function edit(AddMachineRequest $request, $id) { $machine = Machine::findOrFail($id); $machine->update($request->all()); return view('machines.machines_create'); }