vendredi 23 mars 2018

Is the laravel str_random url safe?

I need to generate a random string to use as part of a URL.

I am using laravel 5.6 and currently doing this:

$url = '/controller/' . str_slug(str_random(8)) . '/review';

and I am wondering if I actually need the overhead of str_slug(). I can not seem to find anything that indicates if str_random() produces URL safe strings or not.




Aucun commentaire:

Enregistrer un commentaire