Laravel menghasilkan token unik
use Illuminate\Support\Str;
public function yourFunction(){
$var = Str::random(32);
dd($var);
}
Victorious Vendace
use Illuminate\Support\Str;
public function yourFunction(){
$var = Str::random(32);
dd($var);
}
do {
$token_id = makeRandomToken();
$token_key = makeRandomTokenKey();
} while (User::where("token_id", "=", $token_id)->where("token_key", "=", $token_key)->first() instanceof User);