<style>
    h3{
        border-bottom: 1px solid #89b1d5;
    }
</style>
<div class=" col-sm-12">
    <h3 class="panel-title m-b-15 p-b-10">{{$model->getTitle()}}</h3>

        <?php
        $i=0;
        foreach($columns as $name) {

        $div_class='col-md-12';
        $title = $titles[$i];
    $key_parent = '';

    if(isset($oldModel))
        $key_parent = substr($oldModel->getTable(), 0,strlen($oldModel->getTable())-1);
        //$key = $oldModel->getTable();
        ?>

        @if(!in_array($name,$model->getFieldsHiddens()) && $name!=$key_parent)
            @if(in_array($name,$model->getDates()))
                @include('inc.cruds.input_date')
            @elseif(in_array($name,$model->getColors()))
                @include('inc.cruds.input_color')
            @elseif(in_array($name,$model->getDatetimes()))
                @include('inc.cruds.input_date_time')
            @elseif(in_array($name,$model->getDatesRange()))
                @include('inc.cruds.input_date_range')
            @elseif(in_array($name,$model->getDatetimesRange()))
                @include('inc.cruds.input_date_time_range')
            @elseif(in_array($name,$model->getImages()))
                @include('inc.cruds.input_image')
            @elseif(in_array($name,$model->getTimes()))
                @include('inc.cruds.input_time')
            @elseif(in_array($name,$model->getLongTexts()))
                @include('inc.cruds.input_texte_area')
            @elseif(in_array($name,$model->getNumbers()))
                @include('inc.cruds.input_number',['min'=>0,'max'=>999999999999])
            @elseif(in_array($name,$model->getEmails()))
                @include('inc.cruds.input_email')
            @elseif(in_array($name,$model->getTelephones()))
                @include('inc.cruds.input_telephone')
            @elseif(in_array($name,array_keys($model->getBelongsTo())))
                @include('inc.cruds.select_from_model',['column_name'=>$model->getBelongsTo()[$name]])
            @elseif(in_array($name,array_keys($model->getSelects())))
                @include('inc.cruds.select_from_array',['array'=>$model->getSelects()[$name]])
            @elseif(in_array($name,$model->getPasswords()))
                @include('inc.cruds.input_password')
            @elseif(in_array($name,$model->getFiles()))
                @include('inc.cruds.input_file')
            @elseif(in_array($name,$model->getRichTexts()))
                @include('inc.cruds.input_rich_text')
            @else
                @include('inc.cruds.input_texte')
            @endif
        @endif

        <?php $i++;} ?>

        <div id="other_model">

        </div>



</div>



