예제 #1
0
 protected function findModel($id)
 {
     if (($model = Content::findOne($id)) !== null) {
         //           $model->load(['views' => $model->views++]);
         //           $model->save();
         return $model;
     } else {
         throw new NotFoundHttpException('The requested page does not exist.');
     }
 }