Various code cleanup.

This commit is contained in:
James Cole
2021-09-18 10:20:19 +02:00
parent 481a6bdd5f
commit 3589c9f60f
137 changed files with 369 additions and 282 deletions

View File

@@ -79,12 +79,8 @@ class EditController extends Controller
$startDate = null;
$note = $piggyBank->notes()->first();
// Flash some data to fill the form.
if (null !== $piggyBank->targetdate) {
$targetDate = $piggyBank->targetdate->format('Y-m-d');
}
if (null !== $piggyBank->startdate) {
$startDate = $piggyBank->startdate->format('Y-m-d');
}
$targetDate = $piggyBank->targetdate?->format('Y-m-d');
$startDate = $piggyBank->startdate?->format('Y-m-d');
$preFilled = ['name' => $piggyBank->name,
'account_id' => $piggyBank->account_id,