/** * Show the form for creating a new resource. * * @return Response */ public function gastronomy(Request $request) { $property_id = $request->input('property_id'); $properties = Property::select('id', 'name', 'image', 'status', 'num_bedrooms', 'description', 'slogan', 'country_id', 'service_id', 'state_id', 'city_id', 'property_type_id', 'user_id')->with('country')->with('service')->with('state')->with('city')->with('property_type')->with('user')->orderBy('name', 'ASC')->get(); $chef = Gastronomy::select('nombre', 'apellidos', 'acerca', 'docencia', 'image')->where('property_id', '=', $property_id)->get(); $files = File::select('menu', 'drinks')->where('property_id', '=', $property_id)->get(); return view('gastronomy', compact('properties', 'property_id', 'chef', 'files')); }
/** * Show the form for editing the specified resource. * * @param int $id * @return Response */ public function edit($id) { $user_id = Auth::user()->id; $user_role = User::findOrfail($user_id); $datos = Gastronomy::select('id', 'nombre', 'apellidos', 'acerca', 'docencia', 'property_id')->where('property_id', '=', $id)->get(); return view('admin.properties.chef.edit', compact('datos', 'id', 'user_id', 'user_role')); }