@foreach($columns as $column)
    @if(!in_array($column,$model->getColumnsHiddens()))
        <td>
            @if(array_key_exists($column,$customs_columns))
                <?php  $custom_func = $customs_columns[$column]; ?>
                {!! $element->$custom_func()!!}

            @elseif(in_array($column,$model->getColors()))
                @if($element->$column!=null)
                    <span style="background-color: {{$element->$column}}; padding: 2px 20px; "></span>
                @endif

            @elseif(in_array($column,$model->getDates()))
                @if($element->$column!=null){{date('d-m-Y',strtotime($element->$column))}} @endif
            @elseif(in_array($column,$model->getDatetimes()))
                @if($element->$column!=null){{date('d-m-Y H:i:s',strtotime($element->$column))}} @endif
            @elseif(in_array($column,$model->getFiles()))
                @if($element->$column!=null)
                    <a href="{{url($element->$column)}}" target="_blank"><i class="fa fa-download"></i></a>
                @endif
            @elseif(in_array($column,$model->getImages()))
                @if($element->$column!=null)
                    <a href="{{url($element->$column)}}" target="_blank"><img src="{{url($element->$column)}}" style="width: 100%" alt=""></a>
                @endif
            @elseif(in_array($column,array_keys($model->getBelongsTo())) && $element->$column.'_id'!=null)
                <?php $relation_column=$model->getBelongsTo()[$column]; ?>
                @if($element->$column!=null){{$element->$column->$relation_column}}@endif
            @else{{$element->$column}}@endif
        </td>
    @endif
@endforeach