We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 7b1cbe0 commit 2e105e6Copy full SHA for 2e105e6
app/Http/Controllers/DuesTransactionController.php
@@ -155,7 +155,7 @@ public function store(StoreDuesTransactionRequest $request): JsonResponse
155
// If there's an existing active transaction that hasn't been paid, delete it
156
// and replace it with the one currently being requested
157
if ($user->dues->count() > 0) {
158
- $existingTransaction = $user->dues->last();
+ $existingTransaction = $user->dues()->last();
159
$pkgIsActive = $existingTransaction->package->is_active;
160
if ($pkgIsActive) {
161
$hasPayment = $existingTransaction->payment()->exists();
0 commit comments