floors()->save(new Floor($request->all())); return redirect()->route('admin.object.edit', $object); } /** * Display the specified resource. * * @param int $id * @return \Illuminate\Http\Response */ public function show(Object $object, Floor $floor) { return view('public.floor', compact('floor')); } /** * Show the form for editing the specified resource. * * @param int $id * @return \Illuminate\Http\Response */ public function edit(Object $object, Floor $floor) { return view('floor.edit', compact('object', 'floor')); } /** * Upfloor the specified resource in storage. * * @param \Illuminate\Http\Request $request * @param int $id * @return \Illuminate\Http\Response */ public function update(UpdateFloorRequest $request, Object $object, Floor $floor) { $floor->update($request->all()); return redirect()->route('admin.object.edit', $object); } /** * Remove the specified resource from storage. * * @param int $id * @return \Illuminate\Http\Response */ public function destroy(Object $object, Floor $floor) { $floor->delete(); } }