wanna count the votes of an article according to an authenticated user. So this means I wanna count all rows where article.id = article_votes.article.id and where the article belongst to the authenticated user.
What I have so far
$articles = Article::WithCount('votes')->with('votes')->where('user_id', auth()->user()->id)->get();
Now $articles has two ids for which I wanna count the rows in my article_votes table, but how can I do that?
Did you know that, in addition to the forum, Laracasts includes well over 1000 lessons on modern web development? All for the price of one lunch out per month.