This repository has been archived on 2020-11-09. You can view files and clone it, but cannot push or open issues or pull requests.
Files
pingan/app/Http/Controllers/CouponController.php
2020-08-06 16:37:53 +08:00

21 lines
417 B
PHP

<?php
namespace App\Http\Controllers;
class CouponController extends Controller
{
public function index()
{
$tick = 'YSD' . date('ymdHi') . mt_rand(100, 999);
$tick = strtotime(date('YmdHi', time())) . substr(microtime(), 2, 6) . sprintf('%03d', rand(0, 999));
$data = [
'code' => 200,
'couponCode' => $tick,
];
return $data;
}
}