updating moon rentals to utilize carbon library

This commit is contained in:
2019-02-13 05:48:37 -06:00
parent fde28d0d99
commit a04471ce5a
2 changed files with 3 additions and 4 deletions

View File

@@ -38,7 +38,8 @@ class MoonsController extends Controller
foreach($moons as $moon) {
//Setup formats as needed
$spm = $moon->System . ' - ' . $moon->Planet . ' - ' . $moon->Moon;
$rentalEnd = date('m/d/Y', $moon->RentalEnd);
$rentalEnd = new Carbon($moon->RentalEnd);
$rentalEnd = $rentalEnd->format('m-d');
$price = $moonCalc->SpatialMoonsOnlyGoo($moon->FirstOre, $moon->FirstQuantity, $moon->SecondOre, $moon->SecondQuantity,
$moon->ThirdOre, $moon->ThirdQuantity, $moon->FourthOre, $moon->FourthQuantity);
//Add the data to the html string to be passed to the view