'model' => $model, ]); } protected function findModel($id) { if (($model = News::find()->where(['id'=>$id])->one()) !== null) { return $model; } else { throw new NotFoundHttpException('The requested page does not exist.'); } } }
$_GET = [ 'id' => '845', ];