fixed import
This commit is contained in:
1 parent
5ac208191b
commit
e6ecd7ff8a
2 files changed
+2
-10
No files matched your search
@@ -7,8 +7,6 @@ use Illuminate\Support\Carbon;
|
||||
use Illuminate\Support\LazyCollection;
|
||||
use Spatie\SimpleExcel\SimpleExcelReader;
|
||||
|
||||
use function PHPUnit\Framework\isEmpty;
|
||||
|
||||
class ImportFixtures
|
||||
{
|
||||
public static function run(string $filePath): void
|
||||
@@ -22,10 +20,6 @@ class ImportFixtures
|
||||
|
||||
$row = array_values($row);
|
||||
|
||||
if (isEmpty($row[1])) {
|
||||
return false;
|
||||
}
|
||||
|
||||
/*
|
||||
0 => 1
|
||||
1 => 87
|
||||
|
||||
@@ -7,8 +7,6 @@ use Illuminate\Support\Carbon;
|
||||
use Illuminate\Support\LazyCollection;
|
||||
use Spatie\SimpleExcel\SimpleExcelReader;
|
||||
|
||||
use function PHPUnit\Framework\isEmpty;
|
||||
|
||||
class ImportPlayer
|
||||
{
|
||||
public static function run(string $filePath): void
|
||||
@@ -100,10 +98,10 @@ class ImportPlayer
|
||||
$update_array = [];
|
||||
foreach ($fieldnames as $key => $name) {
|
||||
if ($key == 1) {
|
||||
if (isEmpty($row[$key])) {
|
||||
$match_id = (int) $row[$key];
|
||||
if (! $match_id) {
|
||||
return false;
|
||||
}
|
||||
$match_id = (int) $row[$key];
|
||||
} elseif ($key == 2) {
|
||||
$ss_player_id = (int) $row[$key];
|
||||
} elseif ($key == 3) {
|
||||
|
||||
Reference in new issue
Block a user