/** * Update the specified resource in storage. * * @param Request $request * @param int $id * @return \Illuminate\Http\Response */ public function update(Request $request, $id) { $partner = Object::findOrFail($id); $partner->update($request->all()); return redirect(route('admin.objects.index'))->with('success', 'L\'objet a bien été mis à jour'); }
/** * Remove the specified resource from storage. * * @param int $id * @return \Illuminate\Http\Response */ public function destroy($id) { Object::findOrFail($id)->delete(); return redirect('/objects'); }