This commit is contained in:
root 2020-01-02 00:20:31 +08:00
parent d653541ef3
commit 09e31dc70b

View File

@ -55,9 +55,13 @@ class OrderController extends Controller
} }
private function isExistNotPayOrderByUserId ($userId) { private function isExistNotPayOrderByUserId ($userId) {
return Order::where('status', 1) $order = Order::where('status', 1)
->where('user_id', $userId) ->where('user_id', $userId)
->first(); ->first();
if (!$order) {
return false;
}
return true;
} }
public function save (OrderSave $request) { public function save (OrderSave $request) {