public function middleware($name = '', $role = '', Closure $next = null)
    {
        if (!$this->accessDispatcher) {
            $this->accessDispatcher = new AccessDispatcher();
        }

        $middleware = $this->accessDispatcher->process([
            'name' => $name,
            'role' => $role,
            'next' => $next
        ]);

        if (true !== $middleware) {
            app('route.middleware.failed');
        }

        return true;
    }