Добрый день! Скажите, почему выбивает ошибка после выбора из меню виджета:
An Error occurred while handling another error:
yii\base\ViewNotFoundException: The view file does not exist: /home/igor/Projects/testmmps/frontend/views/site/error.php in /home/igor/Projects/testmmps/vendor/yiisoft/yii2/base/View.php:233
меню (views/layouts/main.php):
echo SideNav::widget([
'options' => ['style' => 'width:200px;align:left'],
'type' => SideNav::TYPE_SUCCESS,
'items' => [
[
'url' => '#',
'label' => 'Статистика',
'icon' => 'home'
],
[
'label' => 'Operations',
'icon' => 'question-sign',
'items' => [
['label' => 'Today', 'icon' => 'info-sign', 'url' =>Url::to(['statistic'])],
//контроллер (controllers/StatisticController.php):
namespace frontend\controllers;
use app\models\Statistic;
use yii\web\Controller;
class StatisticController extends Controller
{
public function actionStatistic()
{
$modelStatistic = new Statistic();
return $this->render('statistic',['modelStatistic' => $modelStatistic]);
}
}
//модель (models/Statistiс.php) :
namespace app\models;
use yii\base\Model;
class Statistic extends Model
{
public $today = "Today";
public function rules()
{
return [
['today','required']
];
}
}
//вьюшка statistic.php(путь до нее views/site)
<h1>Hello</h1>
<?php echo $modelStatistic->today;?>