/** * Show the form for editing the specified resource. * * @param int $id * @return Response */ public function edit($id) { $segment_hotel = \Request::segment(4); $hoteluri = Hoteluris::findOrFail($id); $url = HoteluriImg::where('HotelID', $id)->get(); $facilitatih = explode(",", $hoteluri->facilitati); $fachu = Facilitatis::find($facilitatih); $facunlisted = Facilitatis::whereNotIn('id', $facilitatih)->get(); return view('administrare.pages.hoteluri.edit', compact('hoteluri'))->with('img', $url)->with('idhotel', $segment_hotel)->with('fac', $fachu)->with('facunlist', $facunlisted); }