Skip to content

Commit

Permalink
Bugfix
Browse files Browse the repository at this point in the history
  • Loading branch information
JulianPrieber committed Aug 24, 2023
1 parent a4959c0 commit bedb1ca
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions app/Http/Controllers/AdminController.php
Original file line number Diff line number Diff line change
Expand Up @@ -99,8 +99,8 @@ public function users(Request $request)
// Rest of your code to calculate click counts and link counts for each user

foreach ($users as $user) {
$user->clicks = $clicksCounts[$user->id]->total_clicks ?? 0;
$user->links = $linksCounts[$user->id]->total_links ?? 0;
$user->clicks = Link::where('user_id', $user->id)->sum('click_number');
$user->links = Link::where('user_id', $user->id)->select('link')->count();
}

$data['users'] = $users;
Expand Down

0 comments on commit bedb1ca

Please sign in to comment.