modified moons and adminmoons controllers

This commit is contained in:
2019-05-28 23:54:04 -05:00
parent 35555e3d7c
commit ca6829a3ba
4 changed files with 12 additions and 8 deletions

View File

@@ -87,6 +87,16 @@ class MoonsAdminController extends Controller
'Contact' => $contact,
])->first();
//Calculate the price of the moon for when it's updated
$moon = Moon::where([
'System' => $request->system,
'Planet' => $request->planet,
'Moon' => $request->moon,
])->get()->toArray();
$price = $moonCalc->SpatialMoonsOnlyGoo($moon->FirstOre, $moon->FirstQuantity, $moon->SecondOre, $moon->SecondQuantity,
$moon->ThirdOre, $moon->ThirdQuantity, $moon->FourthOre, $moon->FourthQuantity);
if($found && $request->removal != true) {
if($allianceId = 99004116) {
MoonRental::where([
@@ -178,8 +188,6 @@ class MoonsAdminController extends Controller
//Setup calls to the MoonCalc class
$moonCalc = new MoonCalc();
//Update the prices for the moon
$moonCalc->FetchNewPrices();
//Get all of the moons from the database
$moons = Moon::orderBy('System', 'asc')->get();
//Declare the html variable and set it to null