6
0
Fork 0

生成订单编号

release
李静 2021-12-15 11:59:07 +08:00
parent c9903b8395
commit 553906ac34
1 changed files with 20 additions and 0 deletions

View File

@ -0,0 +1,20 @@
<?php
namespace App\Helpers;
use Illuminate\Support\Str;
class Order
{
/**
* 生成订单流水号
*
* @return string
*/
public static function serialNumber(): string
{
$rand = strtoupper(Str::random(6));
return date('YmdHis').$rand;
}
}