Encrypt a url parameter in laravel

-1

I need to encrypt a parameter in a URL, for example link and display it in this way link

this is the view  

and this is the controller

    
asked by leonaidass 11.01.2018 в 15:20
source

1 answer

1

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.

    
answered by 11.01.2018 в 16:52