From c075112810cc396b9dd9b8f3473c20b94adabbab Mon Sep 17 00:00:00 2001 From: Christopher Mancuso Date: Fri, 16 Jul 2021 23:17:51 -0500 Subject: [PATCH] added ability to see own or corp rented moon in the miningtaxescontroller --- .../MiningTaxes/MiningTaxesController.php | 15 +++++++++++++-- 1 file changed, 13 insertions(+), 2 deletions(-) diff --git a/app/Http/Controllers/MiningTaxes/MiningTaxesController.php b/app/Http/Controllers/MiningTaxes/MiningTaxesController.php index 4a9833834..d2bd62c29 100644 --- a/app/Http/Controllers/MiningTaxes/MiningTaxesController.php +++ b/app/Http/Controllers/MiningTaxes/MiningTaxesController.php @@ -48,7 +48,6 @@ class MiningTaxesController extends Controller */ public function DisplayRentedMoons() { $moons = array(); - $ores = array(); $lookup = new LookupHelper; @@ -65,7 +64,19 @@ class MiningTaxesController extends Controller //Foreach of the moons we got let's build the moon info and the ore data foreach($tempMoons as $tempMoon) { - + //Get the ores for the moon + $ores = AllianceMoonOre::where([ + 'moon_id' => $tempMoon->moon_id, + ])->get(); + + $moons->push([ + 'moon_id' => $tempMoon->moon_id, + 'system' => $tempMoon->system_name, + 'moon_name' => $tempMoon->name, + 'ores' => $ores, + 'worth_amount' => $tempMoon->worth_amount, + 'rental_amount' => $tempMoon->rental_amount, + ]); } return view('miningtax.user.display.rentedmoons')->with('moons', $moons)