生成订单编号
parent
c9903b8395
commit
553906ac34
|
|
@ -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;
|
||||
}
|
||||
}
|
||||
Loading…
Reference in New Issue