SQL issue in piggy banks

This commit is contained in:
James Cole
2019-08-18 11:19:25 +02:00
parent 98cff18efa
commit 98ae0efb16

View File

@@ -220,7 +220,7 @@ class RecurringRepository implements RecurringRepositoryInterface
foreach ($meta as $metaEntry) {
if ('piggy_bank_id' === $metaEntry->name) {
$piggyId = (int)$metaEntry->value;
return $this->user->piggyBanks()->where('id', $piggyId)->first(['piggy_banks.*']);
return $this->user->piggyBanks()->where('piggy_banks.id', $piggyId)->first(['piggy_banks.*']);
}
}