Secure Random Tokens in PHP and Laravel: random_bytes, random_int and Str::random
uniqid(), mt_rand() and rand() are not for secrets. Use random_bytes() or random_int() (or Laravel's Str::random, which uses random_bytes), store a hash of the token instead of the token, and compare with hash_equals().
