Upsert on ACARS positions #572 (#573)

This commit is contained in:
Nabeel S
2020-02-22 16:03:01 -05:00
committed by GitHub
parent 6e87f7804c
commit 9ed07da9c3
6 changed files with 91 additions and 28 deletions

View File

@@ -2,8 +2,7 @@
namespace App\Models\Traits;
use App\Contracts\Model;
use Hashids\Hashids;
use App\Support\Utils;
trait HashIdTrait
{
@@ -14,9 +13,7 @@ trait HashIdTrait
*/
final protected static function createNewHashId(): string
{
$hashids = new Hashids('', Model::ID_MAX_LENGTH);
$mt = str_replace('.', '', microtime(true));
return $hashids->encode($mt);
return Utils::generateNewId();
}
/**