public function actionKimTekst($kim) { $kim = Hashids::decodeOne($kim); if (!$kim) { throw new NotFoundHttpException(); } $kimRecord = Kim::findOne($kim); if (!$kimRecord) { throw new NotFoundHttpException(); } //todo check access ability return $this->render('kim_tekst', compact('kimRecord')); }
public function getKimRel() { return $this->hasMany(Kim::className(), ['id' => 'kim'])->viaTable('kim_kursa', ['kurs' => 'id']); }