files
This commit is contained in:
@@ -163,19 +163,24 @@ class MoonUpdateSeeder extends Seeder
|
|||||||
'FourthQuantity' => $line[10],
|
'FourthQuantity' => $line[10],
|
||||||
]);
|
]);
|
||||||
} else if($count > 0) { //If the moon is found then update it.
|
} else if($count > 0) { //If the moon is found then update it.
|
||||||
|
$firstQuantity = round($line[4] * 100);
|
||||||
|
$secondQuantity = round($line[6] * 100);
|
||||||
|
$thirdQuantity = round($line[8] * 100);
|
||||||
|
$fourthQuantity = round($line[10] * 100);
|
||||||
|
|
||||||
Moon::where([
|
Moon::where([
|
||||||
'System' => $line[0],
|
'System' => $line[0],
|
||||||
'Planet' => $line[1],
|
'Planet' => $line[1],
|
||||||
'Moon' => $line[2],
|
'Moon' => $line[2],
|
||||||
])->update([
|
])->update([
|
||||||
'FirstOre' => $line[3],
|
'FirstOre' => $line[3],
|
||||||
'FirstQuantity' => $line[4],
|
'FirstQuantity' => $firstQuantity,
|
||||||
'SecondOre' => $line[5],
|
'SecondOre' => $line[5],
|
||||||
'SecondQuantity' => $line[6],
|
'SecondQuantity' => $secondQuantity,
|
||||||
'ThirdOre' => $line[7],
|
'ThirdOre' => $line[7],
|
||||||
'ThirdQuantity' => $line[8],
|
'ThirdQuantity' => $thirdQuantity,
|
||||||
'FourthOre' => $line[9],
|
'FourthOre' => $line[9],
|
||||||
'FourthQuantity' => $line[10],
|
'FourthQuantity' => $fourthQuantity,
|
||||||
]);
|
]);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user