symfony - nelmio/alice random string with specified long -
i trying find way generate random unique string 8 characters long using nelmio/alice.
and i've found <uuid()>
(token (unique): <uuid()>
)method, unfortunately returns long string, need 8 characters.
may 1 knows elegant solution?
thanks i've found solution
token (unique): '<( substr( md5( uniqid( rand(), true ) ) , 0, 8) )>'
Comments
Post a Comment