Hi so lets say I have a business name in my table: business called = "Romano Pizza".
I’d like users to be able to type, www.mydomain.com/businesss/Romano Pizza
and it redirect the user and do the view(id) of that business.
I’m unsure how to do this, I would assume it has something to do with the url management thing.
You can do this as
with id and title
in your config/main.php in urlManager
you need to have things like as
This will do a url as
But if you want to have as
Then you need to have either a column named url which must be unique and urlManager as
But if you still would like to have the url as
without any new column in db, then do it like as, in UrlManager
in actionView as
Enjoy the way you want…