skip to Main Content

can't find questions by category name in Laravel

i am trying to retrieve questions based on the category witch they belong with this function inside my questions controller: public function getByCategoryName($categoryName) { $category = Category::where('name', $categoryName)->first(); return response($category->questions); } the problem is that, even if $category its being…

VIEW QUESTION
Back To Top
Search