A model fields and B model fields in same form
Ex:
public static function tableName()
{
return 'a';
}
public function rules()
{
return [
[['id','b_id'], 'id'],
];
}
public function beforeSave($insert)
{
//I want to save b model here
}
I cant access B model attributes in beforeSave()