Skip to content

Commit c2be337

Browse files
committed
feat:[LAR-171] limit number of article
1 parent 2640c3c commit c2be337

File tree

2 files changed

+2
-0
lines changed

2 files changed

+2
-0
lines changed

app/Filament/Resources/ArticleResource/Widgets/MostLikedPostsChart.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,7 @@ protected function getData(): array
2222
{
2323
$articles = Article::published()
2424
->popular()
25+
->limit(10)
2526
->get();
2627

2728
return [

app/Filament/Resources/ArticleResource/Widgets/MostViewedPostsChart.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,7 @@ protected function getData(): array
2525
->published()
2626
->orderByDesc('views_count')
2727
->orderByDesc('published_at')
28+
->limit(10)
2829
->get();
2930

3031
return [

0 commit comments

Comments
 (0)