style: Pint 포맷팅 적용
This commit is contained in:
@@ -20,10 +20,12 @@ public function index(Request $request): JsonResponse
|
||||
});
|
||||
}
|
||||
if ($status = $request->input('status')) {
|
||||
if ($status !== 'all') $query->where('status', $status);
|
||||
if ($status !== 'all') {
|
||||
$query->where('status', $status);
|
||||
}
|
||||
}
|
||||
|
||||
$subscriptions = $query->orderBy('created_at', 'desc')->get()->map(fn($item) => [
|
||||
$subscriptions = $query->orderBy('created_at', 'desc')->get()->map(fn ($item) => [
|
||||
'id' => $item->id, 'customer' => $item->customer,
|
||||
'plan' => $item->plan, 'monthlyFee' => $item->monthly_fee,
|
||||
'billingCycle' => $item->billing_cycle,
|
||||
@@ -87,6 +89,7 @@ public function destroy(int $id): JsonResponse
|
||||
{
|
||||
$tenantId = session('selected_tenant_id', 1);
|
||||
Subscription::forTenant($tenantId)->findOrFail($id)->delete();
|
||||
|
||||
return response()->json(['success' => true, 'message' => '구독이 삭제되었습니다.']);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user