updating moon rentals to utilize carbon library

This commit is contained in:
2019-02-13 05:45:53 -06:00
parent e48902e077
commit fde28d0d99

View File

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