Skip to content

Commit b31d58e

Browse files
committed
feat: filter out people with zero solutions in widget
1 parent 1157ade commit b31d58e

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

app/Models/User.php

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -319,7 +319,9 @@ public function scopeMostSolutions(Builder $query, ?int $inLastDays = null)
319319
}
320320

321321
return $query;
322-
}])->orderBy('solutions_count', 'desc');
322+
}])
323+
->having('solutions_count', '>', 0)
324+
->orderBy('solutions_count', 'desc');
323325
}
324326

325327
public function scopeMostSubmissions(Builder $query, ?int $inLastDays = null)

0 commit comments

Comments
 (0)