1use Illuminate\Support\Str;
2
3public function yourFunction(){
4 $var = Str::random(32);
5
6 dd($var);
7}
1do {
2 $token_id = makeRandomToken();
3 $token_key = makeRandomTokenKey();
4} while (User::where("token_id", "=", $token_id)->where("token_key", "=", $token_key)->first() instanceof User);