<table>
    <thead>
    <tr>
        @if($user->disabledColumn('title','companies'))
            <th scope="col">{{ __('companies.title') }}</th>
        @endif
        @if($user->disabledColumn('address','companies'))
            <th scope="col">{{ __('companies.address') }}</th>
        @endif
        @if($user->disabledColumn('description','companies'))
            <th scope="col">{{ __('companies.description') }}</th>
        @endif
        @if($user->disabledColumn('domain','companies'))
            <th scope="col">{{ __('companies.domain') }}</th>
        @endif
        @if($user->disabledColumn('sector_id','companies'))
            <th scope="col">{{ __('companies.sector_id') }}</th>
        @endif
        @if($user->disabledColumn('country_id','companies'))
            <th scope="col">{{ __('companies.country_id') }}</th>
        @endif
        @if($user->disabledColumn('created_at','companies'))
            <th scope="col" >{{ __('dashboard.created_at') }}</th>
        @endif
    </tr>
    </thead>
    <tbody class="response">
    @foreach($companies as $key=> $row)
        <tr>
            @if($user->disabledColumn('title','companies'))
                <td>{{ $row->title }}</td>
            @endif
            @if($user->disabledColumn('address','companies'))
                <td>{{ $row->address }}</td>
            @endif
            @if($user->disabledColumn('description','companies'))
                <td>{{ $row->description }}</td>
            @endif
            @if($user->disabledColumn('domain','companies'))
                <td>{{ $row->domain }}</td>
            @endif
            @if($user->disabledColumn('sector_id','companies'))
                <td>{{ $row->sector->currentDescription->title ?? '' }}</td>
            @endif
            @if($user->disabledColumn('country_id','companies'))
                <td>{{ $row->country->currentDescription->title ?? '' }}</td>
            @endif
            @if($user->disabledColumn('created_at','companies'))
                <td>{{ \Carbon\Carbon::parse($row->created_at)->format('Y/m/d') }}</td>
            @endif
        </tr>
    @endforeach
    </tbody>
</table>
