コード例 #1
0
ファイル: Note.php プロジェクト: jslight/helpdesk
 /**
  * @return AttachmentQuery
  */
 public function getAttachment()
 {
     return $this->hasOne(Attachment::className(), ['note_id' => 'id'])->inverseOf('note');
 }
コード例 #2
0
ファイル: Goods.php プロジェクト: cboy868/nana
 public function getAttach()
 {
     return $this->hasOne(Attachment::className(), ['id' => 'cover']);
 }