SiteController.php 1.0 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758
  1. <?php
  2. namespace backend\controllers;
  3. use yii\filters\VerbFilter;
  4. use yii\web\Controller;
  5. /**
  6. * Site controller.
  7. */
  8. class SiteController extends Controller
  9. {
  10. /**
  11. * {@inheritdoc}
  12. */
  13. public function behaviors()
  14. {
  15. return [
  16. 'verbs' => [
  17. 'class' => VerbFilter::className(),
  18. 'actions' => [
  19. 'logout' => ['post'],
  20. ],
  21. ],
  22. ];
  23. }
  24. /**
  25. * {@inheritdoc}
  26. */
  27. public function actions()
  28. {
  29. return [
  30. 'error' => [
  31. 'class' => 'yii\web\ErrorAction',
  32. ],
  33. 'demo' => [
  34. 'class' => 'yii\web\ViewAction',
  35. ],
  36. ];
  37. }
  38. public function actionIndex()
  39. {
  40. $this->layout = false;
  41. return $this->render('index');
  42. }
  43. public function actionDashboard()
  44. {
  45. return $this->render('dashboard');
  46. }
  47. public function actionIcons()
  48. {
  49. return $this->render('pages/icons');
  50. }
  51. }