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