I want to hide id
from URL
, I have a database table that contains user_name, slug.
I’m using str_replace to remove any spaces in URL so if I used store/{slug} the parameters from url will not be the same as if I modified the url using str_replace.
Before:-
![](https://www.thedataops.org/wp-content/uploads/2022/12/Screenshot-07-31-2020-18.31.57.png)
After :-
We are using code in Controller.
![](https://www.thedataops.org/wp-content/uploads/2022/12/smallcase.png)
Result :-
Laravel Hide ID from url
![](https://www.thedataops.org/wp-content/uploads/2022/12/small-1.png)