Import Excel Data using Phpspreadsheet

Fields configs:

    'import_fields' => [
        'E' => ['saleName', 'saleName'], 
        'F' => ['salesSubtitle', 'salesSubtitle'], 
        'G' => ['prdDesPlanner', 'prdDesPlanner'], 
        'I' => ['costPrice', 'costPrice'], 
        'J' => ['salePrice', 'salePrice'], 
        'K' => ['marketPrice', 'marketPrice'], 
        'T' => ['productSpec', 'productSpec'], 
        'U' => ['attentionItem', 'attentionItem'], 
        'V' => ['useMethod', 'useMethod'], 
    ], 

PHP

use PhpOffice\PhpSpreadsheet\IOFactory;
use PhpOffice\PhpSpreadsheet\Writer\Xlsx;
use PhpOffice\PhpSpreadsheet\Spreadsheet;

    public function import_save(Request $req){
        $this->check_pms_ajax($this->pms_key . 'import');
        $file = $req->file('file');
        //logg($file->getClientOriginalName());
        
        $file_name = 'import_products.xlsx';
        $dest = storage_path('app');
        $file->move($dest, $file_name);
        //$path = $file->store('app/public');
        //logg($dest);

        $spreadsheet = IOFactory::load($dest . '/' . $file_name);
        $sheetData = $spreadsheet->getActiveSheet()->toArray(null, true, true, true);
        //dd($sheetData);

        $fields = Config::get('wikirex.import_fields');
        //logg($fields);

        $success = 0;
        $failed = 0;
        foreach ($sheetData as $row_index => $row) {
            if($row_index == 1) continue;
            //logg($row);

            $row_errs = [];

            //Get product by ID
            $id = $row['A'];
            if($id == false || is_numeric($id) == false){
                $row_errs[] = 'Invalid Product ID: Column A, row ' . $row_index;
            }else{
                $product = ProductM::find($id);
                if($product == false){
                    $row_errs[] = 'Product is not found. ID: Column A, row ' . $row_index;
                }else{
                    foreach ($fields as $key => $field) {
                        $value = $row[$key];
                        $product->{$field[0]} = $value;
                    }
                    //logg($product);
                    $product->save();
                }
            }

            if($row_errs == false){
                echo 'Row ' . ($row_index) . ': Success.<br/>';
                    $success++;
            }else{
                echo 'Row ' . ($row_index) . ': Failed. ' . implode(';', $row_errs) . '<br/>';
                $failed++;
            }
        }

        echo 'Done';
    }