public function actionIndex() { //return $this->render('index'); $model = Invoice::findOne(1); echo 'fdsaf'; echo "<pre>"; print_r(Invoice::className()); echo "</pre>"; }
/** * Finds the Invoice model based on its primary key value. * If the model is not found, a 404 HTTP exception will be thrown. * @param string $id * @return Invoice the loaded model * @throws NotFoundHttpException if the model cannot be found */ protected function findModel($id) { if (($model = Invoice::findOne($id)) !== null) { return $model; } else { throw new NotFoundHttpException('The requested page does not exist.'); } }