Files
heping-api/app/controller/Order.php
2022-09-09 16:24:11 +08:00

22 lines
430 B
PHP

<?php
namespace app\controller;
class Order
{
public function create()
{
$userid = $GLOBALS['data']['userid'];
$order = \app\model\Order::create([
'student_id' => 1,
'user_id' => $userid,
'amount' => 15,
'type' => 1,
'status' => 0,
]);
return show("订单创建成功!", SUCCESS_CODE, $order->id);
}
}