<?php

namespace app\admin\common;

use app\BaseController;
use app\common\middleware\Auth;
use app\common\middleware\Permission;

/**
 * Description of AdminController
 *
 * @author sgq
 */
class AdminController extends BaseController {

    protected $middleware = [Auth::class, Permission::class];
    protected $user;

    //put your code here
    public function __construct(\think\App $app) {
        parent::__construct($app);
        $this->user = session("user");
        if ($this->user["usertype"] != 1)
            session("user", null);
    }

}
