I am looking to write a piece of javascript that will append a parameter to the current url and then refresh the page - how can I do this?
Try this
var url = ApiUrl(`/customers`); if(data){ url += '?search='+data; } else { url += `?page=${page}&per_page=${perpage}`; } console.log(url);