Пример #1
0
 /**
  * @return array the validation rules.
  */
 public function rules()
 {
     return array_merge(parent::rules(), [[['file'], 'file', 'maxFiles' => 5]]);
 }
Пример #2
0
 /**
  * @return \yii\db\ActiveQuery
  */
 public function getIdAdvertising()
 {
     return $this->hasOne(Advertisement::className(), ['id' => 'id_advertising']);
 }