diff --git a/src/PortAbstract.php b/src/PortAbstract.php index 90241be4..0c0096c8 100644 --- a/src/PortAbstract.php +++ b/src/PortAbstract.php @@ -190,9 +190,12 @@ function verify($transaction) function getTimeId() { - $uid = time(); - while ($this->getTable()->whereId($uid)->first()) - $uid = time(); + $genuid = function(){ + return substr(str_pad(str_replace('.','', microtime(true)),12,0),0,12); + }; + $uid=$genuid(); + while (static::find($uid)) + $uid = $genuid(); return $uid; }