]); } protected function findModel($id) { $model = Contents::findOne($id); if ($model !== null AND $model->status) { return $model; } else { throw new NotFoundHttpException('The requested page does not exist.'); } } }
$_GET = [ 'id' => '8', ];