import moons

This commit is contained in:
2021-05-30 19:12:30 +09:00
parent df5f29566d
commit 76b19c6ff5

View File

@@ -91,6 +91,7 @@ class ImportAllianceMoons extends Command
$moonInfo = $lookup->GetMoonInfo($moon[6]); $moonInfo = $lookup->GetMoonInfo($moon[6]);
$solarName = $lookup->SystemIdToName($moonInfo->system_id); $solarName = $lookup->SystemIdToName($moonInfo->system_id);
if(AllianceMoon::where(['moon_id' => $moonInfo->moon_id])->count() == 0) {
//Save the moon into the database //Save the moon into the database
$newMoon = new AllianceMoon; $newMoon = new AllianceMoon;
$newMoon->moon_id = $moonInfo->moon_id; $newMoon->moon_id = $moonInfo->moon_id;
@@ -101,6 +102,7 @@ class ImportAllianceMoons extends Command
$newMoon->rented = 'No'; $newMoon->rented = 'No';
$newMoon->rental_amount = 0.00; $newMoon->rental_amount = 0.00;
$newMoon->save(); $newMoon->save();
}
//Save a new entry into the database //Save a new entry into the database
$ore = new AllianceMoonOre; $ore = new AllianceMoonOre;