🔄 در حال انجام: تست دستی Filament ⏸️ بلاک: مهاجرت ۳۹۵۰ رکورد (منتظر فایل اکسل اصلاحشده) ⏸️ بلاک: پلاگین وردپرس (بعد از تست کامل API)
33 lines
655 B
PHP
33 lines
655 B
PHP
<?php
|
|
|
|
namespace App\Imports;
|
|
|
|
use Maatwebsite\Excel\Concerns\OnEachRow;
|
|
use Maatwebsite\Excel\Concerns\WithMultipleSheets;
|
|
use Maatwebsite\Excel\Concerns\WithStartRow;
|
|
use Maatwebsite\Excel\Row;
|
|
|
|
class DebugImport implements WithMultipleSheets
|
|
{
|
|
public function sheets(): array
|
|
{
|
|
return [
|
|
'List' => new DebugSheet(),
|
|
];
|
|
}
|
|
}
|
|
|
|
class DebugSheet implements OnEachRow, WithStartRow
|
|
{
|
|
public function startRow(): int
|
|
{
|
|
return 3;
|
|
}
|
|
|
|
public function onRow(Row $row)
|
|
{
|
|
$cells = $row->toArray();
|
|
echo 'Row: ' . $row->getIndex() . ' | AWB: ' . ($cells[0] ?? '') . PHP_EOL;
|
|
}
|
|
}
|