From 57d01028cf8e62efee0dbdb15bc63cac220ad7e2 Mon Sep 17 00:00:00 2001 From: Christopher Mancuso Date: Tue, 13 Jul 2021 02:22:45 -0500 Subject: [PATCH] display rented moons in the controller --- .../MiningTaxes/MiningTaxesController.php | 29 +++++++++++++++++++ 1 file changed, 29 insertions(+) diff --git a/app/Http/Controllers/MiningTaxes/MiningTaxesController.php b/app/Http/Controllers/MiningTaxes/MiningTaxesController.php index bdda1de10..4a9833834 100644 --- a/app/Http/Controllers/MiningTaxes/MiningTaxesController.php +++ b/app/Http/Controllers/MiningTaxes/MiningTaxesController.php @@ -43,6 +43,35 @@ class MiningTaxesController extends Controller $this->middleware('role:User'); } + /** + * Display the moons either the person is renting, or their corp are renting + */ + public function DisplayRentedMoons() { + $moons = array(); + $ores = array(); + + $lookup = new LookupHelper; + + $userId = auth()->user()->getId(); + $charInfo = $lookup->GetCharacterInfo(auth()->user()->getId()); + $corpId = $charInfo->corporation_id; + + + $tempMoons = AllianceMoonRental::where([ + 'entity_id' => $userId, + ])->orWhere([ + 'entity_id' => $corpId, + ])->get(); + + //Foreach of the moons we got let's build the moon info and the ore data + foreach($tempMoons as $tempMoon) { + + } + + return view('miningtax.user.display.rentedmoons')->with('moons', $moons) + ->with('ores', $ores); + } + /** * Display the page with the moon rental form */