I have a function allArticlesCount that counts all articles that have draft 1.
$allArticlesCount = Article::where('draft', 1)->count();
I also have a function that counts the number of articles in a specific category, I use withCount , but she counts absolutely all the articles, and I only need with draft 1
$categories = BlogCategory::withCount('articles')->get();
The question is, how can I make it so that all articles that have draft 1 are counted in the $categories function?