From 09e31dc70b93aaaaa4d1b6e96d6675403fed69f7 Mon Sep 17 00:00:00 2001 From: root Date: Thu, 2 Jan 2020 00:20:31 +0800 Subject: [PATCH] update --- app/Http/Controllers/OrderController.php | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/app/Http/Controllers/OrderController.php b/app/Http/Controllers/OrderController.php index 17d99b8e..086b16b7 100755 --- a/app/Http/Controllers/OrderController.php +++ b/app/Http/Controllers/OrderController.php @@ -55,9 +55,13 @@ class OrderController extends Controller } private function isExistNotPayOrderByUserId ($userId) { - return Order::where('status', 1) + $order = Order::where('status', 1) ->where('user_id', $userId) ->first(); + if (!$order) { + return false; + } + return true; } public function save (OrderSave $request) {