This commit is contained in:
root 2020-01-02 00:07:30 +08:00
parent 6ff24f77b8
commit 2911680eaf

View File

@ -54,7 +54,7 @@ class OrderController extends Controller
]); ]);
} }
private function isExistNotPayOrder () { private function isExistNotPayOrder (Request $request) {
return Order::where('status', 1) return Order::where('status', 1)
->where('user_id', $request->session()->get('id')) ->where('user_id', $request->session()->get('id'))
->first(); ->first();
@ -64,7 +64,7 @@ class OrderController extends Controller
if ($this->isExistNotPayOrder()) { if ($this->isExistNotPayOrder()) {
abort(500, '存在未付款订单,请取消后再试'); abort(500, '存在未付款订单,请取消后再试');
} }
$plan = Plan::find($request->input('plan_id')); $plan = Plan::find($request->input('plan_id'));
$user = User::find($request->session()->get('id')); $user = User::find($request->session()->get('id'));