Skip to content

Commit

Permalink
Adding statistics only for the current user:: by sergio giraldo @ 202…
Browse files Browse the repository at this point in the history
…30809T1400CEST, gpg signed
  • Loading branch information
sergiorgiraldo committed Aug 9, 2023
1 parent b4670e3 commit 3278d58
Showing 1 changed file with 16 additions and 4 deletions.
20 changes: 16 additions & 4 deletions app/Http/Controllers/App/DashboardController.php
Original file line number Diff line number Diff line change
Expand Up @@ -37,11 +37,23 @@ public function index(): View
->where('status', '>', 1)
->count();

$totalLinks = Link::byUser()
->count();

$totalLists = LinkList::byUser()
->count();

$totalNotes = Note::byUser()
->count();

$totalTags = Tag::byUser()
->count();

$stats = [
'total_links' => Link::count(),
'total_lists' => LinkList::count(),
'total_tags' => Tag::count(),
'total_notes' => Note::count(),
'total_links' => $totalLinks,
'total_lists' => $totalLists,
'total_tags' => $totalTags,
'total_notes' => $totalNotes,
'total_broken_links' => $brokenLinks,
];

Expand Down

0 comments on commit 3278d58

Please sign in to comment.