2017-06-06 51 views
0

是否有可能減少揹包crud中的某些列的寬度爲laravel,添加列中是否有任何屬性允許?laravel的揹包寬度

的顯示圖像,我希望交換的1秒的glyphicon-OK,但我不能找到一個方法來做到這一點

image

public function setup(){ 

    $this->crud->setModel("App\ReporteParamEstacion"); 
    $this->crud->setRoute("admin/reporte_paramestacion"); 
    // $this->crud->setRouteName("crud.reportes.listado_importacion"); 
    $this->crud->setEntityNameStrings('parametro estacion', 'parametro estaciones'); 
    $this->crud->enableExportButtons(); 
    $this->crud->removeAllButtons(); 

    $this->crud->addColumn([ 
    'name' => 'nombre', 
    'label' =>'Estacion', 
    'type' => 'text' 
    ]); 

    $this->crud->addColumn([ 
    'name' => 'nombre_comuna', 
    'label' =>'Comuna', 
    'type' => 'text' 
    ]); 

    $this->crud->addColumn([ 
    'name' => 'MP10', 
    'label' =>'MP10', 
    'type' => 'text' 


    ]); 

    $this->crud->addColumn([ 
    'name' => 'MP25', 
    'label' =>'MP25', 
    'type' => 'text' 

    ]); 

    $this->crud->addColumn([ 
    'name' => 'SO2', 
    'label' =>'SO2', 
    'type' => 'text' 
    ]); 

    $this->crud->addColumn([ 
    'name' => 'NO2', 
    'label' =>'NO2', 
    'type' => 'text' 
    ]); 

    $this->crud->addColumn([ 
    'name' => 'CO', 
    'label' =>'CO', 
    'type' => 'text' 

    ]); 

    $this->crud->addColumn([ 
    'name' => 'O3', 
    'label' =>'O3', 
    'type' => 'text' 
    ]); 

    $this->crud->addColumn([ 
    'name' => 'BC', 
    'label' =>'BC', 
    'type' => 'text' 
    ]); 

    $this->crud->addColumn([ 
    'name' => 'NOX', 
    'label' =>'NOX', 
    'type' => 'text' 
    ]); 
} 

在此先感謝

+0

您應該使用檢查列類型而不是:https://laravel-backpack.readme.io/docs/crud-columns-types – tabacitu

回答

0

設置類型爲「檢查」,如下所示:

[ 'name' => 'mp10', // The db column name 'label' => "MP10", // Table column heading 'type' => 'check' ]

+0

可以減少列寬嗎? –

+0

我不得不從類型檢查改變,因爲我有問題導出PDF格式,似乎圖標不能導出到PDF –