public function index($cat_id) { $faqs = QuestionsAnswers::where('cat_id', $cat_id)->paginate(20); $category_name = Category::findOrFail($cat_id); $category_name = $category_name->name; return view('faq::faqs.index', compact('faqs', 'cat_id', 'category_name')); }
public function edit($id) { $categories = Category::findOrFail($id); return view('faq::categories.edit', compact('categories')); }