moon displays

This commit is contained in:
2021-06-01 00:01:03 +09:00
parent bc0b3336c5
commit 49257e4cf4

View File

@@ -89,29 +89,25 @@ class MiningTaxesController extends Controller
$systems = AllianceMoon::where([
'rented' => 'No',
])->where('moon_type', '=', 'R4')
->orWhere('moon_type', '=', 'R8')
->orWhere('moon_type', '=', 'R16')
->pluck('system_name')->unique()->toArray();
])->pluck('system_name')->unique()->toArray();
//Get all of the moons which are not rented
$allyMoons = AllianceMoon::where([
'rented' => 'No',
])->where('moon_type', '=', 'R4')
->orWhere('moon_type', '=', 'R8')
->orWhere('moon_type', '=', 'R16')
->get();
])->get();
foreach($allyMoons as $moon) {
$ores = AllianceMoonOre::where([
'moon_id' => $moon->moon_id,
])->get(['ore_name', 'quantity'])->toArray();
if($moon->moon_type != 'R32' || $moon->moon_type != 'R64') {
$moons->push([
'system' => $moon->name,
'ores' => $ores,
]);
}
}
return view('miningtax.user.display.moons.availablemoons')->with('moons', $moons)
->with('systems', $systems)