get('p_sources'); } public static function tableName() { return '{{%coin_cross_chain}}'; } //定义场景 const SCENARIOS_CREATE = 'create'; public function rules() { return [ [['is_with_draw', 'address', 'txhex_first', 'transfer_url_first', 'txhex_second', 'transfer_url_second'], 'required'], ['transfer_number', 'safe'] ]; } public function scenarios() { $scenarios = [ self:: SCENARIOS_CREATE => ['is_with_draw', 'address', 'txhex_first', 'transfer_url_first', 'txhex_second', 'transfer_url_second', 'transfer_number'], ]; return array_merge(parent:: scenarios(), $scenarios); } }