Skip to content

Commit 05a653b

Browse files
committed
Only list enabled components
1 parent f2205ab commit 05a653b

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

src/Http/Controllers/StatusPage/StatusPageController.php

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ public function index(): View
1919
{
2020
return view('cachet::status-page.index', [
2121
'componentGroups' => ComponentGroup::query()
22-
->with(['components' => fn ($query) => $query->orderBy('order')->withCount('incidents')])
22+
->with(['components' => fn ($query) => $query->enabled()->orderBy('order')->withCount('incidents')])
2323
->visible(auth()->check())
2424
->when(auth()->check(), fn ($query) => $query->users(), fn ($query) => $query->guests())
2525
->get(),
@@ -31,6 +31,7 @@ public function index(): View
3131
->setRelation(
3232
'components',
3333
Component::query()
34+
->enabled()
3435
->whereNull('component_group_id')
3536
->orderBy('order')
3637
->withCount('incidents')

0 commit comments

Comments
 (0)