public function index() { $faqs = Faq::where('Status', '=', 'Active')->get(); $data['room'] = Rooms::select('roomtype.RoomType_Name', '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(40)->get()->all(); $data['offer'] = Offer::where('Status', '=', 'Active')->take(40)->get()->all(); $data['about'] = About::get()->all(); return View::make('faqs.index', compact('faqs'))->with('data', $data); }
public function index() { $testimonial = Testimonial::orderby('date', 'DESC')->where('Status', '=', 'Confirm')->paginate(10, ['Name', 'Email', 'Subject', 'Message', 'Date'], 'ID_Feedback'); $data['room'] = Rooms::select('roomtype.RoomType_Name', '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(40)->get()->all(); $data['offer'] = Offer::where('Status', '=', 'Active')->take(40)->get()->all(); $data['about'] = About::get()->all(); return View::make('Testimonials.index', compact('testimonial'))->with('data', $data); }
public function show($id) { $events = Events::findOrFail($id); $data['room'] = Rooms::select('roomtype.RoomType_Name', '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(40)->get()->all(); $data['offer'] = Offer::where('Status', '=', 'Active')->take(40)->get()->all(); $data['about'] = About::get()->all(); return View::make('Events.show', compact('events'))->with('event_active', 'active')->with('data', $data); }
public function show($id) { $dinas = Dinasevents::orderby('Event_Date', 'Desc')->where('Event_ID', '=', $id)->firstOrFail(); $data['room'] = Rooms::select('roomtype.RoomType_Name', '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(40)->get()->all(); $data['offer'] = Offer::where('Status', '=', 'Active')->take(40)->get()->all(); $data['about'] = About::get()->all(); return View::make('dinasevents.show', compact('dinas'))->with('data', $data); }
public function show($id) { $travel = Travel::where('ID_Travel', '=', $id)->firstOrFail(); $data['room'] = Rooms::select('roomtype.RoomType_Name', '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(40)->get()->all(); $data['offer'] = Offer::where('Status', '=', 'Active')->take(40)->get()->all(); $data['about'] = About::get()->all(); $package = TravelPackage::where('ID_Travel', '=', $id)->get(); return View::make('travels.show', compact('travel'))->with('package', $package)->with('data', $data); }
public function show($id) { $destination = Destination::where('ID_Destination', '=', $id)->firstOrFail(); $listDest = Destination::where('Status', '=', 'Active')->get(); $data['room'] = Rooms::select('roomtype.RoomType_Name', '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(40)->get()->all(); $data['offer'] = Offer::where('Status', '=', 'Active')->take(40)->get()->all(); $data['about'] = About::get()->all(); return View::make('Destinations.show', compact('destination', 'listDest'))->with('data', $data); }
public function show($id) { $facility = Facilities::where('ID_Facility', '=', $id)->firstOrFail(); $faciList = Facilities::where('Status', '=', 'Active')->get(); $data['room'] = Rooms::select('roomtype.RoomType_Name', '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(40)->get()->all(); $data['offer'] = Offer::where('Status', '=', 'Active')->take(40)->get()->all(); $data['about'] = About::get()->all(); return View::make('Facilities.show', compact('facility', 'listFaci'))->with('faci_active', 'active')->with('faciList', $faciList)->with('data', $data); }
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); }
File::delete($filename); } $package->delete(); } else { for ($i = 0; $i < $package->count(); $i++) { if (File::exists($filename)) { File::delete($filename); } $package->delete(); } } }); /*---------------------------------------------------*/ //home Route::get('/', function () { $data['room'] = Rooms::select('roomtype.RoomType_Name', '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(40)->get()->all(); $data['offer'] = Offer::where('Status', '=', 'Active')->take(40)->get()->all(); $data['dinas'] = Dinasevents::select(DB::raw("Event_ID, Event_Picture, Event_Date, Event_Title, CONCAT(SUBSTRING(Event_Description,1,100),'...') as IsiEvent"))->orderby('Event_Date', 'DESC')->take(40)->get()->all(); $data['travel'] = Travel::where('Status', '=', 'Active')->take(40)->get()->all(); $data['destination'] = Destination::where('Status', '=', 'Active')->take(40)->get()->all(); $data['gallery'] = Gallery::where("Status", "!=", "Delete")->get()->all(); $data['about'] = About::get()->all(); Session::put('key', 'expiry', 1); $value = Session::get('key'); return View::make('home')->with('index', 'active')->with('data', $data); }); Route::get('post/listing', array('uses' => 'PostController@listing', 'as' => 'get.post.listing')); Route::get('post/{id}', array('uses' => 'PostController@single', 'as' => 'get.post.single'))->where(array('id' => '[1-9][0-9]*', 'slug' => '[a-zA-Z0-9-_]+')); Route::post('post/{id}', array('uses' => 'PostController@update', 'as' => 'post.post.update'))->where(array('id' => '[1-9][0-9]*')); Route::resource('user', 'UserController'); //resource