isLogin) { return AppFactory::determineResponseFactory()->createResponse(302)->withHeader('Location', '/auth/login'); } if (!$user->is_admin) { return AppFactory::determineResponseFactory()->createResponse(302)->withHeader('Location', '/user'); } return $handler->handle($request); } }