简体   繁体   English

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

[英]How to change type of column table field in laravel backpack?

So my table would be looks like this one所以我的桌子看起来像这个

[   // 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
]

So the default for the columns is text, and i want to change it to choice.所以列的默认值是文本,我想将其更改为选择。 Anyone have an solution for this?有人对此有解决方案吗?

Updating column attributes with migrations.使用迁移更新列属性。 Check documentation:检查文档:

updating columns attributes in Laravel 更新 Laravel 中的列属性

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM