honeyBear
1 week ago

Trying to hide button in blade

Posted 1 week ago by honeyBear

I have problems on trying to hide button, below are the condition that I have set in order to display or not to display the button. Either way i still cant hide the button if I use elseif. Any solutions?

<!--if number of teams in pivot table less size of team slot in tournament post user can see the button else can't--> 
@if(count($post->teams) < $post->size)
     <a href="/team/register/post/{{$post->id}}" class="btn btn-outline-dark btn-sm">
          {{ __('Register') }}
     </a>
@else

@endif

<!--if team id in pivot table is same with user team id user can't see the button else can-->
@if($team['id'] == auth()->user()->team['id'])

@else
     <a href="/team/register/post/{{$post->id}}" class="btn btn-outline-dark btn-sm">
          {{ __('Register') }}
     </a>
@endif

Please sign in or create an account to participate in this conversation.