public function appendToQueryString(Request $request, $name, $value)
    {
        $queryString = '?';
        $query = $request->query->all();
        $query[$name] = $value;
        $parametersCount = count($query);
        $count = 1;

        foreach ($query as $parameterName => $parameterValue) {
            $queryString .= $parameterName . '=' . $parameterValue;

            if ($count != $parametersCount) {
                $queryString .= '&';
            }
            $count++;
        }
        return $queryString;
    }