mirror of
https://github.com/v2board/v2board.git
synced 2025-01-31 02:29:14 +08:00
update
This commit is contained in:
parent
84e67df33d
commit
ac04599a19
@ -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([
|
||||
|
Loading…
Reference in New Issue
Block a user