Skip to content

Commit

Permalink
Cut down homepage queries a little
Browse files Browse the repository at this point in the history
  • Loading branch information
ssddanbrown committed Jul 3, 2016
1 parent 565033e commit a11d524
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion app/Services/ActivityService.php
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,7 @@ public function latest($count = 20, $page = 0)
{
$activityList = $this->permissionService
->filterRestrictedEntityRelations($this->activity, 'activities', 'entity_id', 'entity_type')
->orderBy('created_at', 'desc')->skip($count * $page)->take($count)->get();
->orderBy('created_at', 'desc')->with('user', 'entity')->skip($count * $page)->take($count)->get();

return $this->filterSimilar($activityList);
}
Expand Down

0 comments on commit a11d524

Please sign in to comment.