Answer the question
In order to leave comments, you need to log in
How to get the number of questions with a certain status?
You need to enter a number indicating the number of questions with the status "Published" and "Unanswered".
So far, it has only been possible to display the total number of questions in a category ({{$category->questions->count()}})
But how to get the number of questions that have a certain status?
www.prntscr.com/jo3jb7
Answer the question
In order to leave comments, you need to log in
$category->questions->where('колонка_статус, 'определенный статус')->count()
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question