diff --git a/resources/views/forum/forums/show.blade.php b/resources/views/forum/forums/show.blade.php index 0c621e36a0f..d658854a59e 100644 --- a/resources/views/forum/forums/show.blade.php +++ b/resources/views/forum/forums/show.blade.php @@ -13,7 +13,9 @@ ]) @php - $currentUserId = Auth::user()?->getKey(); + $currentUser = Auth::user(); + $currentUserId = $currentUser?->getKey(); + $subforums = $forum->subforums; @endphp @section('content') @include('forum._header', [ @@ -33,7 +35,7 @@
- @if ($forum->subforums()->exists()) + @if (count($subforums) > 0)