<?php
/**
 * Created by PhpStorm.
 * User: Administrator
 * Date: 2018/2/26/026
 * Time: 9:56
 */

namespace backend\controllers;

use backend\base\CommonController;
use Yii;
use yii\helpers\ArrayHelper;
class IndexController extends  CommonController
{



//        public $enableCsrfValidation = false;

//        public function behaviors()
//        {
//            // 声明缓存配置
//            return [ // 需要注意的这里是二维数组
//                [
//                    'class' => 'yii\filters\HttpCache', // 设置需要加载的缓存文件
//                    'only' => ['index'], // 设置需要缓存的控制器
//                    'lastModified' => function(){ // 设置 Last-Modified 头
//                        return 1548922;
//                    },
//                    'etagSeed' => function (){ // 设置 ETag 头
//                        return 'hello';
//                    }
//                ]
//            ];
//        }

        /*
         * 菜单栏
         * */
        public function actionIndex()
        {
            $model = new \backend\server\Menus();
            $row = $model->TopMenu();
//            p($row);
//            exit;
            return $this->render('index',['model'=>$row]);
        }

        /*
         * 首页
         * */
        public function actionMain()
        {
            return $this->render('main');
        }


        /*
        *  首页 -通知详情
        */
        public function actionShow()
        {
            return $this->render('show');
        }
}