Warning: file_get_contents(/data/phpspider/zhask/data//catemap/0/laravel/10.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
如何更改laravel背包中列表字段的类型?_Laravel_Laravel Backpack - Fatal编程技术网

如何更改laravel背包中列表字段的类型?

如何更改laravel背包中列表字段的类型?,laravel,laravel-backpack,Laravel,Laravel Backpack,所以我的桌子看起来像这个 [ // Table 'name' => 'options', 'label' => 'Options', 'type' => 'table', 'entity_singular' => 'option', // used on the "Add X" button 'columns' => [ 'name' => 'Na

所以我的桌子看起来像这个

[   // Table
'name'            => 'options',
'label'           => 'Options',
'type'            => 'table',
'entity_singular' => 'option', // used on the "Add X" button
'columns'         => [
    'name'  => 'Name',
    'desc'  => 'Description',
    'price' => 'Price'
],
    'max' => 5, // maximum rows allowed in the table
    'min' => 0, // minimum rows allowed in the table
]

因此,列的默认值是text,我想将其更改为choice。是否有解决方案?

使用迁移更新列属性。检查文件:


在laravel双肩包中也能使用吗?也许你可以用他的视觉模式在双肩包中进行更改,但laravel双肩包是基于laravel的,迁移就是针对这种情况的。