bisa ganti status free plan
All checks were successful
Build, Push and Deploy / build-and-push (push) Successful in 3m13s
Gitea Actions Demo / Explore-Gitea-Actions (push) Successful in 16s
Build, Push and Deploy / deploy-staging (push) Successful in 29s
Build, Push and Deploy / deploy-production (push) Has been skipped

This commit is contained in:
triagungbiantoro
2026-04-25 22:43:18 +07:00
parent 417b7b7453
commit be6c6e8cff

View File

@@ -127,11 +127,14 @@ public function update(Request $request, Plan $plan)
public function status(Request $request, $id) public function status(Request $request, $id)
{ {
$plan = Plan::findOrFail($id); $plan = Plan::findOrFail($id);
/*
if ($plan->subscriptionName == 'Free') { if ($plan->subscriptionName == 'Free') {
return response()->json([ return response()->json([
'message' => __('You can not change the status for free plan.'), 'message' => __('You can not change the status for free plan.'),
], 406); ], 406);
} }
*/
$plan->update(['status' => $request->status]); $plan->update(['status' => $request->status]);
return response()->json(['message' => 'Plan']); return response()->json(['message' => 'Plan']);
} }