1234567891011121314151617181920212223242526272829 |
- <?php
- namespace app\controllers;
- use app\models\Page;
- class PageController extends \yii\web\Controller
- {
- public $defaultAction = 'page';
- /**
- * {@inheritdoc}
- */
- public function actions()
- {
- return [
- 'error' => [
- 'class' => 'yii\web\ErrorAction',
- ]
- ];
- }
-
- public function actionPage($id)
- {
- $page = new Page();
- return $this->render('/site/page', [
- 'model' => $page->findOne($id),
- ]);
- }
- }
|