
<table class='table'>
    <thead>
    <tr>
        @if($user->disabledColumn('name','users'))
            <th class="column_name">
                <div class="header-content" >
                    <label class="form-check-label" >{{ __('users.name') }}</label>
                </div>
            </th>
        @endif
        @if($user->disabledColumn('email','users'))
            <th class="column_email">
                <div class="header-content" >
                    <span>{{ __('users.email') }}</span>
                </div>
            </th>
        @endif
        @if($user->disabledColumn('phone','users'))
            <th class="column_phone">
                <div class="header-content" >
                    <span>{{ __('users.phone') }}</span>
                </div>
            </th>
        @endif
        @if($user->disabledColumn('role','users'))
            <th class="column_role">
                <div class="header-content" >
                    <span>{{ __('users.role') }}</span>
                </div>
            </th>
        @endif
        @if($user->disabledColumn('created_at','users'))
            <th colspan="2" class="column_created_at">
                <div class="header-content" >
                    <span>{{ __('dashboard.created_at') }}</span>
                </div>
            </th>
        @endif
    </tr>
    </thead>
    <tbody>

        @foreach($users as $row)
            <tr>
                @if($user->disabledColumn('name','users'))
                    <td class="column_email"> <div class="text"> {{$row->name}} </div> </td>
                @endif
                @if($user->disabledColumn('email','users'))
                    <td class="column_email"> <div class="text"> {{$row->email}} </div> </td>
                @endif
                @if($user->disabledColumn('phone','users'))
                    <td class="column_phone"> <a href="tel:{{$row->phone}}" class="text"> {{$row->phone}} </a> </td>
                @endif
                @if($user->disabledColumn('role','users'))
                    <td class="column_role"> <div class="text"> {{__('users.roles.'.$row->role)}} </td>
                @endif
                @if($user->disabledColumn('created_at','users'))
                    <td class="column_created_at" colspan="2"> <div class="text"> {{ \Carbon\Carbon::parse($row->created_at)->format('Y/m/d') }} </td>
                @endif
            </tr>
        @endforeach

    </tbody>
</table>
