Q:

Blade Engine Elements Render Sorting

I have this code :
<div class="table-responsive">
  <table class="table table-condensed table-hover">
    <tr>
    <th>#</th>
    <th>Name</th>
    <th>username</th>
    <th>Email</th>
    <th>Rank</th>
    <th>Join</th>
  </tr>
  @if($count)
      @foreach($users as  $i => $user)
      <tr>
      <td>{{ $i+1 }}</td>
      <td>{{ $user->first_name }} {{ $user->last_name }}</td>
        <td>{{ $user->username }}</td>
        <td>{{ $user->email }}</td>
        <td>
            @if($user->rank == 0)
              Admin
            @else
              User
            @endif
        </td>
        <td>{{ $user->created_at }}</td>
        {{ Form::hidden('id', $user->id,['class'=>'id']) }}
        {{ Form::hidden('username', $user->username,['class'=>'username']) }}
        <td><button id="submit" type="button" class="btn btn-danger" data-toggle="modal" data-target="#deleteModal">
          Delete
        </button></td>
      </tr>
      @endforeach
  @else
  <div class="alert alert-success" style="text-align:center">
      There is no users in the Site
  </div>
  @endif

which used Blade Template engine, but in case that's count is false the alert div appears before Heading of table 
How can this problem be fixed ?

A:

I may be missing something here, the code above seems incomplete (table is not closing). But why not move your alert outside of the other if so you can place it where you need it: 
@if(!$count)
  <div class="alert alert-success" style="text-align:center">
  There is no users in the Site
  </div>
@endif

