/** * @return \yii\db\ActiveQuery */ public function getApiLogs() { return $this->hasMany(ApiLog::className(), ['key_id' => 'id']); }