Skip to content

Commit

Permalink
Check if there is posts before showing in menu
Browse files Browse the repository at this point in the history
  • Loading branch information
dsbilling committed Mar 1, 2022
1 parent 7205c3d commit 438ccc0
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions resources/views/layouts/guest.blade.php
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@
</div>
<div class="hidden sm:block">
<div class="flex items-baseline ml-auto space-x-3">
<x-nav-link-front href="{{ route('blog.index') }}">Blog</x-nav-link-front>
@if(\App\Models\Post::isPublished()->count() > 0)<x-nav-link-front href="{{ route('blog.index') }}">Blog</x-nav-link-front>@endif
</div>
</div>
<div class="flex -mr-2 sm:hidden">
Expand All @@ -56,7 +56,7 @@ class="inline-flex items-center justify-center p-2 text-gray-800 rounded-md dark
</div>
<div :class="{'block': open, 'hidden': ! open}" class="hidden sm:hidden">
<div class="px-2 pt-2 pb-3 space-y-1 sm:px-3">
<x-nav-link-responsive-front href="{{ route('blog.index') }}">Blog</x-nav-link-responsive-front>
@if(\App\Models\Post::isPublished()->count() > 0)<x-nav-link-responsive-front href="{{ route('blog.index') }}">Blog</x-nav-link-responsive-front>@endif
</div>
</div>
</nav>
Expand Down

0 comments on commit 438ccc0

Please sign in to comment.