I need to encrypt a parameter in a URL, for example link and display it in this way link
and this is the controller
The only thing you need is to put:
encrypt($var->id)
Once you are in the route controller, you do:
decrypt("tu variable id")
and you're done.