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);
 }
Beispiel #2
0
 public function get($limit = 30)
 {
     $faqs = Faq::where('draft_flag', false)->orderBy('sort', 'ASC');
     if (count($this->_tags) > 0) {
         $faqs->where(function ($query) {
             foreach ($this->_tags as $tag) {
                 $query->orWhere('tags', 'LIKE', '%"' . $tag . '"%');
             }
         });
     }
     return $faqs->paginate($limit);
 }
Beispiel #3
0
 /**
  * Get total faq count.
  *
  * @param bool $all
  *
  * @return mixed
  */
 protected function totalFaqs()
 {
     return $this->faq->where('lang', $this->getLang())->count();
 }
Beispiel #4
0
 public function view_faq($id)
 {
     $data = Faq::where('id', $id)->first();
     return View::make('admin.faq.show', compact('data'));
 }