Model view controller 不动产;银行行长。swift“U代码”;没有定义

Model view controller 不动产;银行行长。swift“U代码”;没有定义,model-view-controller,yii2,cexception,Model View Controller,Yii2,Cexception,当我点击yii中的添加新按钮时,我在呈现模式时遇到问题,出现以下错误 CException 未定义属性“BankMaster.swift_code” 这是视图文件(BankMaster/_form.php) swift_代码也是我所做的更改 然后我在erp\u bank\u master表中添加了一列 解决方案:“wp_105578”是正确的数据库,而不是“wpexp_dev” 缓存可能出现问题。清除你的缓存。@Inaseskull谢谢,但仍然给出相同的错误。“清除缓存”是什么意思?如果您使用

当我点击yii中的添加新按钮时,我在呈现模式时遇到问题,出现以下错误

CException

未定义属性“BankMaster.swift_code”

这是视图文件(BankMaster/_form.php

swift_代码也是我所做的更改

然后我在erp\u bank\u master表中添加了一列

解决方案:“wp_105578”是正确的数据库,而不是“wpexp_dev”


缓存可能出现问题。清除你的缓存。@Inaseskull谢谢,但仍然给出相同的错误。“清除缓存”是什么意思?如果您使用的是FileCache,请删除目录/runtime/cache/*并通过以下方式尝试解决方案:@Mahsa@all解决方案:“wp_105578”是正确的数据库,而不是“wpexp_dev”,感谢您的支持。可能是
缓存出现问题。清除你的缓存。@Inaseskull谢谢,但仍然给出相同的错误。“清除缓存”是什么意思?如果您使用的是FileCache,请删除目录/runtime/cache/*并通过以下方式尝试解决方案:@Mahsa@all解决方案:“wp_105578”是正确的数据库,而不是“wpexp_dev”,谢谢您的支持。
 <?php echo $form->textFieldRow($model, 'swift_code', array('labelOptions' => array('class' => 'col-md-8 bank-master-settings-cls'), 'class' => 'col-xs-12 col-sm-12 col-md-12 col-lg-12', 'maxlength' => 100)); ?>
public function rules() {
    // NOTE: you should only define rules for those attributes that
    // will receive user inputs.
    return array(
        array('full_name, short_name,iban_no,branch,payroll_status', 'required'),
        array('full_name, address, email,swift_code', 'safe'),
        array('opening_balance', 'numerical'),
        array('ledger_code', 'uniqueCode'),
        array('telephone,account_no, company_id', 'numerical', 'integerOnly' => true),
        array('short_name,ledger_code', 'length', 'max' => 100),
        array('full_name, email', 'length', 'max' => 100),
        array('email', 'email'),
        array('short_name', 'uniqueInLedger'),
        // The following rule is used by search().
        // @todo Please remove those attributes that should not be searched.
        array('id, short_name,account_no,iban_no,opening_balance,op_balance_dc,branch_type,branch, full_name, address, telephone, email, payroll_status, is_default', 'safe', 'on' => 'search'),
    );
}