Answer the question
In order to leave comments, you need to log in
How to do city select with city name in Laravel url?
Hello!
Tell me how to implement the name of the city in the url?
There is a modal with a list of cities, each city has a slug. How, after clicking on a city, to make the slug of the city always be after the domain name, until another one is selected?
The list of cities is stored in the database
Answer the question
In order to leave comments, you need to log in
if I understand correctly, then the question is not related to the Laravel branch
https://developer.mozilla.org/ru/docs/Web/API/Loca...
function changeURL() {
var theURL = window.location.pathname;
return theURL.replace("/url_part_to_change/", "/new_url_part/");
}
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question