public function index($lang, $cat = FALSE)
 {
     if ($cat) {
         $faqs = Faq::getByCat($cat);
     } else {
         $faqs = Faq::all();
     }
     $cats = Faq::getCats();
     return view('faq.index')->with(['faqs' => $faqs, 'cats' => $cats]);
 }
 public function homepage()
 {
     $user = Auth::user() ?: false;
     $cars = Car::with('inquiriesCount')->orderBy('domestic', 'asc')->orderBy('name')->get();
     $cars1 = $cars->filter(function ($item) {
         return $item->name == "ВАЗ";
     });
     $cars2 = $cars->filter(function ($item) {
         return $item->name != "ВАЗ";
     });
     $cars = $cars1->merge($cars2);
     $carsList = $cars->lists('name', 'id')->toArray();
     $lastInquiries = Inquiry::with('car', 'city')->orderBy('created_at', 'desc')->paginate(config('vars.inquiries_per_page'));
     $lastInquiries->setPath('inquiry/index');
     Carbon::setLocale(config('app.locale'));
     $lastNews = News::orderBy('published_at', 'desc')->paginate(config('vars.news_per_page'));
     $lastNews->setPath('news/index');
     $cities = City::lists('name', 'id')->all();
     $blocks = Block::all()->keyBy('alias');
     $faq = Faq::all();
     return view('homepage', compact('user', 'cars', 'carsList', 'lastInquiries', 'lastNews', 'cities', 'blocks', 'faq'));
 }
Beispiel #3
0
 /**
  * Display a listing of the resource.
  *
  * @return \Illuminate\Http\Response
  */
 public function index(Model $objects)
 {
     $objects_for_filter = Model::all();
     return view('admin.faq.list', ['objects' => $objects->paginate(10), 'objects_for_filter' => $objects_for_filter]);
 }
 /**
  * Display the specified resource.
  * @return \Illuminate\Http\Response
  */
 public function show()
 {
     $data = ['title' => 'Teleaus Admin Dashboard | All FAQs Page', 'faqs' => Faq::all()];
     return view('dashboard.allFaq')->with($data);
 }
Beispiel #5
0
 public function getFaqs()
 {
     $faqs = Faq::all();
     $onePiece = $this->onePiece();
     return View('FAQ', compact('faqs', 'onePiece'));
 }
Beispiel #6
0
 /**
  * Display a listing of the resource.
  *
  * @return Response
  */
 public function index()
 {
     $items = Faq::all();
     return view('admin.faq.index', compact('items'));
 }
 /**
  * Display a listing of the resource.
  *
  * @return \Illuminate\Http\Response
  */
 public function index()
 {
     $faq = Faq::all();
     return view('faq.index', compact('faq'));
 }
Beispiel #8
0
 public function getFaqs()
 {
     $faqs = Faq::all();
     return view("admin/faqs")->with("faqs", $faqs);
 }
Beispiel #9
0
 public function getFaqs()
 {
     $faqs = Faq::all();
     return $faqs;
 }
 public function ShowFAQEdit()
 {
     $faqs = Faq::all();
     $category = DB::table('faq_cat')->orderBy('category')->get();
     return view('faqedit', compact('faqs', 'category'));
 }
 public function faq()
 {
     $faqs = Faq::all();
     return view('faq', compact('faqs'));
 }
 public function ShowFAQ()
 {
     $faqs = Faq::all();
     $category = DB::table('faq_cat')->orderBy('category')->get();
     if (Auth::check()) {
         return redirect('/FAQ/edit');
     }
     return view('faq', compact('faqs', 'category'));
 }