admin.php 428 B

12345678910111213141516171819202122
  1. <?php
  2. namespace middleware;
  3. use Qii\Base\Middleware\Request as Middleware;
  4. use Qii\Base\Request;
  5. use Closure;
  6. class admin implements Middleware
  7. {
  8. public function __construct()
  9. {
  10. }
  11. public function handle(Request $request, Closure $next) {
  12. $isValid = false;
  13. if (!$isValid) {
  14. echo '管理员登录后重试';
  15. return false;
  16. }
  17. return $next($request);
  18. }
  19. }