This commit is contained in:
root 2019-10-27 19:57:21 +08:00
parent 84e67df33d
commit ac04599a19

View File

@ -46,15 +46,15 @@ class PlanController extends Controller
public function drop (Request $request) {
if (Order::where('plan_id', $request->input('id'))->first()) {
abort(500, '套餐下存在订单无法删除');
abort(500, '该订阅下存在订单无法删除');
}
if (User::where('plan_id', $request->input('id'))->first()) {
abort(500, '套餐下存在用户无法删除');
abort(500, '该订阅下存在用户无法删除');
}
if ($request->input('id')) {
$plan = Plan::find($request->input('id'));
if (!$plan) {
abort(500, '套餐ID不存在');
abort(500, '该订阅ID不存在');
}
}
return response([