<?php
namespace backend\controllers;
use Yii;
use yii\web\Controller;
use yii\web\NotFoundHttpException;
class SiteController extends Controller
{
public function beforeAction($action)
{
throw new NotFoundHttpException();
}
if (!\Yii::$app->user->isGuest) {
return $this->render('login');
}