mirror of
https://github.com/CyanoFresh/SmartHomePHP.git
synced 2026-02-20 03:11:26 +01:00
26 lines
530 B
PHP
26 lines
530 B
PHP
<?php
|
|
|
|
namespace app\controllers;
|
|
|
|
use Yii;
|
|
use yii\web\Controller;
|
|
|
|
class SiteController extends Controller
|
|
{
|
|
public function actions()
|
|
{
|
|
return [
|
|
'error' => [
|
|
'class' => 'app\components\ErrorAction',
|
|
'layout' => Yii::$app->user->isGuest ? 'base' : 'main',
|
|
'view' => Yii::$app->user->isGuest ? '/error/guest-error' : '/error/error',
|
|
],
|
|
];
|
|
}
|
|
|
|
public function actionIndex()
|
|
{
|
|
return $this->render('index');
|
|
}
|
|
}
|