diff --git a/app/Api/V1/Requests/PiggyBankRequest.php b/app/Api/V1/Requests/PiggyBankRequest.php index b113fa8fe2..68ef285527 100644 --- a/app/Api/V1/Requests/PiggyBankRequest.php +++ b/app/Api/V1/Requests/PiggyBankRequest.php @@ -57,7 +57,7 @@ class PiggyBankRequest extends Request 'current_amount' => $this->string('current_amount'), 'start_date' => $this->date('start_date'), 'target_date' => $this->date('target_date'), - 'note' => $this->string('notes'), + 'notes' => $this->string('notes'), ]; } diff --git a/app/Http/Controllers/PiggyBankController.php b/app/Http/Controllers/PiggyBankController.php index 7eb87a3f17..087f227379 100644 --- a/app/Http/Controllers/PiggyBankController.php +++ b/app/Http/Controllers/PiggyBankController.php @@ -208,7 +208,7 @@ class PiggyBankController extends Controller 'targetamount' => $piggyBank->targetamount, 'targetdate' => $targetDate, 'startdate' => $startDate, - 'note' => null === $note ? '' : $note->text, + 'notes' => null === $note ? '' : $note->text, ]; session()->flash('preFilled', $preFilled); diff --git a/app/Repositories/PiggyBank/PiggyBankRepository.php b/app/Repositories/PiggyBank/PiggyBankRepository.php index ad4c3b51a0..325146cde4 100644 --- a/app/Repositories/PiggyBank/PiggyBankRepository.php +++ b/app/Repositories/PiggyBank/PiggyBankRepository.php @@ -451,7 +451,7 @@ class PiggyBankRepository implements PiggyBankRepositoryInterface /** @var PiggyBank $piggyBank */ $piggyBank = PiggyBank::create($data); - $this->updateNote($piggyBank, $data['note']); + $this->updateNote($piggyBank, $data['notes']); // repetition is auto created. $repetition = $this->getRepetition($piggyBank); @@ -479,7 +479,7 @@ class PiggyBankRepository implements PiggyBankRepositoryInterface $piggyBank->save(); - $this->updateNote($piggyBank, $data['note']); + $this->updateNote($piggyBank, $data['notes']); // if the piggy bank is now smaller than the current relevant rep, // remove money from the rep. diff --git a/resources/views/piggy-banks/create.twig b/resources/views/piggy-banks/create.twig index 332d8fc041..9811780caf 100644 --- a/resources/views/piggy-banks/create.twig +++ b/resources/views/piggy-banks/create.twig @@ -31,7 +31,7 @@