예제 #1
0
 public function getItemTerms()
 {
     $item = $_GET['item'];
     $terms = PriceLog::where('item_id', $item)->orderBy('date', 'desc')->take(3)->get();
     return $terms;
 }
예제 #2
0
파일: ProductBase.php 프로젝트: adsavin/car
 /**
  * @return \yii\db\ActiveQuery
  */
 public function getPriceLogs()
 {
     return $this->hasMany(PriceLog::className(), ['product_id' => 'id']);
 }