示例#1
0
 public function actionIndex()
 {
     //return $this->render('index');
     $model = Invoice::findOne(1);
     echo 'fdsaf';
     echo "<pre>";
     print_r(Invoice::className());
     echo "</pre>";
 }
示例#2
0
 /**
  * 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.');
     }
 }