Skip to content

Commit

Permalink
Fix
Browse files Browse the repository at this point in the history
  • Loading branch information
MichaelBelgium committed Sep 18, 2021
1 parent a8a56a4 commit 0414428
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion extend.php
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@
})->relationship(DV_RELATIONSHIP_LATEST, function (AbstractModel $model) use ($settings) {
return $model->views()->limit($settings->get('michaelbelgium-discussionviews.max_listcount', 5));
})->relationship(DV_RELATIONSHIP_UNIQUE, function (AbstractModel $model) use ($settings) {
return $model->views()->groupBy('user_id')->havingRaw('user_id IS NOT NULL')->orderByRaw('MAX(visited_at) DESC')
return $model->hasMany(DiscussionView::class)->groupBy('user_id')->havingRaw('user_id IS NOT NULL')->orderByRaw('MAX(visited_at) DESC')
->limit($settings->get('michaelbelgium-discussionviews.max_listcount', 5));
}),

Expand Down

0 comments on commit 0414428

Please sign in to comment.