From a7b3d6e77852f6a48c230d9acd60d433499092c0 Mon Sep 17 00:00:00 2001 From: Tokumeikoi Date: Thu, 27 Feb 2020 19:39:26 +0800 Subject: [PATCH] add onetime plan --- app/Http/Controllers/Admin/PlanController.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/Http/Controllers/Admin/PlanController.php b/app/Http/Controllers/Admin/PlanController.php index 86e812dc..ea4dc974 100755 --- a/app/Http/Controllers/Admin/PlanController.php +++ b/app/Http/Controllers/Admin/PlanController.php @@ -29,7 +29,7 @@ class PlanController extends Controller abort(500, '该订阅不存在'); } DB::beginTransaction(); - if ($params->group_id !== $plan->group_id) { + if (isset($params->group_id) && ($params->group_id !== $plan->group_id)) { if (!User::where('plan_id', $plan->id) ->get() ->update(['group_id', $plan->group_id])