Skip to content

Commit 3347630

Browse files
committed
Added filterByDay scope to the dailyQuestions.
Removed people form array.
1 parent cdf1eab commit 3347630

File tree

2 files changed

+1
-6
lines changed

2 files changed

+1
-6
lines changed

app/Http/Controllers/DashboardController.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ public function __invoke(PieChartService $pieChartService)
1313
{
1414
return Inertia::render('Dashboard', [
1515
'totalQuestions' => (int) PromptQuestion::whereHas('promptAnswer')->count(),
16-
'dailyQuestions' => (int) PromptQuestion::whereHas('promptAnswer')->count(),
16+
'dailyQuestions' => (int) PromptQuestion::whereHas('promptAnswer')->filterByDay(now())->count(),
1717
'pieChartData' => $pieChartService
1818
->data(PromptAnswer::class, 'subject_category')
1919
->labels('subject_category')

app/Services/MotivationalMessageService.php

-5
Original file line numberDiff line numberDiff line change
@@ -55,11 +55,6 @@ protected function getRandomPerson(): string
5555
{
5656
return collect([
5757
'Neil Degrasse Tyson',
58-
'Joe Rogan',
59-
'Elon Musk',
60-
'Andy Frisella',
61-
'David Goggins',
62-
'Jocko Willink',
6358
])->random();
6459
}
6560
}

0 commit comments

Comments
 (0)