コード例 #1
0
ファイル: News.php プロジェクト: andr-ik/yii2-demo-news-site
 /**
  * @return \yii\db\ActiveQuery
  */
 public function getCategory()
 {
     return $this->hasOne(Category::className(), ['id' => 'category_id']);
 }