From 09a01398399a235c5ceca64b581ae68afbdc466e Mon Sep 17 00:00:00 2001 From: Deon George Date: Mon, 2 Dec 2024 19:44:08 +1100 Subject: [PATCH] Dont display inactive systems in the sidebar --- resources/views/layouts/partials/sidebar.blade.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/resources/views/layouts/partials/sidebar.blade.php b/resources/views/layouts/partials/sidebar.blade.php index 74c39fa..da30d76 100644 --- a/resources/views/layouts/partials/sidebar.blade.php +++ b/resources/views/layouts/partials/sidebar.blade.php @@ -2,10 +2,10 @@ FTN Networks @auth - @if($user->systems->count()) + @if(($x=$user->systems->where('active',TRUE))->count())
My Systems
- @foreach ($user->systems->sortBy('name') as $o) + @foreach ($x as $o)
{{ $o->name }}
@endforeach