wip
This commit is contained in:
1 parent
443bff0a2b
commit
2a54730e60
1 file changed
+5
-4
@@ -12,12 +12,12 @@ class ImportDetails
|
||||
{
|
||||
use UpdateHelper;
|
||||
|
||||
public static array $player_collection = [];
|
||||
|
||||
public static function run(string $filePath): void
|
||||
{
|
||||
$now = now()->format('Y-m-d H:i:s');
|
||||
|
||||
$player_collection = [];
|
||||
|
||||
SimpleExcelReader::create(storage_path('app/public/'.$filePath))
|
||||
->getRows()
|
||||
->chunk(1000)
|
||||
@@ -41,7 +41,7 @@ class ImportDetails
|
||||
|
||||
if ($row[1] != '') {
|
||||
|
||||
$player_collection[] = (int) $row[0];
|
||||
self::$player_collection[] = (int) $row[0];
|
||||
|
||||
StatistikoDetail::upsert(
|
||||
[
|
||||
@@ -97,9 +97,10 @@ class ImportDetails
|
||||
// );
|
||||
}
|
||||
}
|
||||
|
||||
});
|
||||
|
||||
StatistikoDetail::whereNotIn('ss_player_id', $player_collection)->update(['is_active' => 0, 'ss_team_id' => 0]);
|
||||
StatistikoDetail::whereNotIn('ss_player_id', self::$player_collection)->update(['is_active' => 0, 'ss_team_id' => 0]);
|
||||
|
||||
/**update statistic player tabel */
|
||||
// UpdateHelper::updatePlayers(1000000);
|
||||
|
||||
Reference in new issue
Block a user