在我的數據庫結構Yii2 - CheckBoxList的值存儲在數據庫
service_request type enum('towel','tissue','napkin')
然後有一個模型
* @property string $service_request
然後在我看來
<?= $form->field($model, 'service_request')->checkBoxList([ 'towel' => 'Towel', 'tissue' => 'Tissue', 'napkin' => 'Napkin']) ?>
然後當我選擇毛巾,紙巾和餐巾然後提交表格,它有一個錯誤說
服務請求必須爲String
請幫我
謝謝