public function show($id) { $curr['name'] = $this->lists['show']['name']; $curr['url'] = $this->lists['show']['url']; $result = ['data' => OrderProductModel::find($id), 'lists' => $this->lists, 'curr' => $curr]; return view('member.orderpro.show', $result); }
public function pre($id, $video_id) { //去除最新的标识 OrderProductModel::where('id', $id)->update(['is_new' => 2]); $data = VideoModel::find($video_id); $result = ['video' => $data, 'orderProModel' => OrderProductModel::find($id), 'videoName' => $data->name]; return view('layout.videoPre', $result); }
/** * 设置定价 */ public function setMoney($id, $money) { $orderProModel = OrderProductModel::find($id); $formatMoney = $orderProModel->getFormatMoney(); $data = ['genre' => 3, 'order_id' => $id, 'money' => $formatMoney + $money, 'weal' => $formatMoney, 'created_at' => time()]; PayModel::create($data); //创作订单表状态更新 OrderProductModel::where('id', $id)->update(['status' => 2]); return redirect(DOMAIN . 'admin/orderpro'); }