public function show($id) { $rooms = Rooms::where('ID_RoomType', '=', $id)->firstOrFail(); $listRooms = Rooms::where('Status', '=', 'Active')->get(); $data['offer'] = Offer::where('Status', '=', 'Active')->take(40)->get()->all(); $data['about'] = About::get()->all(); return View::make('Rooms.show', compact('rooms', 'listRooms'))->with('room_active', 'active')->with('listRoom', $listRooms)->with('data', $data); }
public function BookNormal($idRoom) { $rooms = Rooms::where('ID_RoomType', '=', $idRoom)->where('Status', '=', 'Active')->get(); $tax = Tax::where('Status', '=', 'Active')->get(); $additional = Additional::where('Status', '=', 'Active')->get(); $countAdd = Additional::where('Status', '=', 'Active')->count(); $data['about'] = About::get()->all(); return View::make('Books.Normal.show')->with('data', $data)->with('rooms', $rooms)->with('tax', $tax)->with('additional', $additional)->with('countAdd', $countAdd); }
public function show($id) { $room = Rooms::select('roomtype.ID_RoomType', 'roomtype_pic.Picture')->join('roomtype_pic', 'roomtype.ID_RoomType', '=', 'roomtype_pic.ID_RoomType')->where('roomtype_pic.Main_Pic', '=', 'YES')->where('roomtype.Status', '=', 'Active')->take(15)->get(); $countRoom = Rooms::where('Status', '=', 'Active')->count(); $offer = Offer::findOrFail($id); $offerDetail = Offer::join('detail_offer', 'detail_offer.ID_Offer', '=', 'offer.ID_Offer')->join('roomtype_pic', 'roomtype_pic.ID_RoomType', '=', 'detail_offer.ID_RoomType')->join('roomtype', 'roomtype.ID_RoomType', '=', 'detail_offer.ID_RoomType')->where('offer.Status', '=', 'Active')->where('roomtype_pic.Main_Pic', '=', 'YES')->where('offer.ID_Offer', '=', $id)->get(); $offerCount = Offer::join('detail_offer', 'detail_offer.ID_Offer', '=', 'offer.ID_Offer')->join('roomtype_pic', 'roomtype_pic.ID_RoomType', '=', 'detail_offer.ID_RoomType')->join('roomtype', 'roomtype.ID_RoomType', '=', 'detail_offer.ID_RoomType')->where('offer.Status', '=', 'Active')->where('roomtype_pic.Main_Pic', '=', 'YES')->where('offer.ID_Offer', '=', $id)->count(); $data['about'] = About::get()->all(); return View::make('offers.show')->with('offer', $offer)->with('offerDetail', $offerDetail)->with('room', $room)->with('countRoom', $countRoom)->with('offerCount', $offerCount)->with('data', $data); }
public function index() { $room = Rooms::select('roomtype.ID_RoomType', 'roomtype_pic.Picture')->join('roomtype_pic', 'roomtype.ID_RoomType', '=', 'roomtype_pic.ID_RoomType')->where('roomtype_pic.Main_Pic', '=', 'YES')->where('roomtype.Status', '=', 'Active')->take(15)->get(); $data['about'] = About::get()->all(); $countRoom = Rooms::where('Status', '=', 'Active')->count(); $offer = Offer::where('Status', '=', 'Active')->take(15)->get(); $countOffer = Offer::where('Status', '=', 'Active')->count(); $about = About::all(); return View::make('Books.View.index')->with('data', $data)->with('room', $room)->with('countRoom', $countRoom)->with('offer', $offer)->with('countOffer', $countOffer)->with('about', $about); }