Some code cleanup.

This commit is contained in:
James Cole
2016-05-20 08:00:35 +02:00
parent ed948cc965
commit dda3082c7e
13 changed files with 17 additions and 20 deletions

View File

@@ -131,9 +131,8 @@ class PiggyBankController extends Controller
/*
* Flash some data to fill the form.
*/
if (!is_null($piggyBank->targetdate) || !$piggyBank->targetdate == '') {
$targetDate = new Carbon($piggyBank->targetdate);
$targetDate = $targetDate->format('Y-m-d');
if (!is_null($piggyBank->targetdate)) {
$targetDate = $piggyBank->targetdate->format('Y-m-d');
}
$preFilled = ['name' => $piggyBank->name,