Пример #1
0
 /**
  * @return AttachmentQuery
  */
 public function getAttachment()
 {
     return $this->hasOne(Attachment::className(), ['note_id' => 'id'])->inverseOf('note');
 }
Пример #2
0
 public function getAttach()
 {
     return $this->hasOne(Attachment::className(), ['id' => 'cover']);
 }