<?php
namespace middleware;

use Qii\Base\Middleware\Request as Middleware;
use Qii\Base\Request;
use Closure;

class admin implements Middleware
{

    public function __construct()
    {
    }
    public function handle(Request $request, Closure $next) {
        $isValid = false;
        if (!$isValid) {
            echo '管理员登录后重试';
            return false;
        }
        return $next($request);
    }
}