示例#1
0
 /**
  * Display all Faq entries.
  *
  * @param int $id
  *
  * @return Response
  */
 public function all()
 {
     $faqs = $this->faqRepository->published();
     if (empty($faqs)) {
         abort(404);
     }
     return view('quarx-frontend::faqs.all')->with('faqs', $faqs);
 }
示例#2
0
 /**
  * Remove the specified FAQ from storage.
  *
  * @param int $id
  *
  * @return Response
  */
 public function destroy($id)
 {
     $faq = $this->faqRepository->findFAQById($id);
     if (empty($faq)) {
         Quarx::notification('FAQ not found', 'warning');
         return redirect(route('quarx.faqs.index'));
     }
     $faq->delete();
     Quarx::notification('FAQ deleted successfully.', 'success');
     return redirect(route('quarx.faqs.index'));
 }