I'm trying to create a simple url shortener in my Laravel project. I want to use only lowercase and uppercase letters and numbers as short url addresses. (For example: sD7hY6g) Is there a possibility that "Str::random()" function under "Illuminate\Support\Str" class in Laravel returns anything other than these characters? Can I trust this function or do I need to create my own custom function?
(In addition, whichever function I use, I check whether the code is already in the database before recording.)
Thank you to everyone who answered in advance.
Aucun commentaire:
Enregistrer un commentaire