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