<?php

namespace App\Imports;

use App\Helpers\Helper;
use Illuminate\Support\Collection;
use Maatwebsite\Excel\Concerns\ToCollection;
use Maatwebsite\Excel\Concerns\WithHeadingRow;

class CustomerTransferTemplateTransferImportImport implements ToCollection, WithHeadingRow
{
    public $rows = [];

    /**
     * @param Collection $rows
     * @return bool
     * @throws \Exception
     */
    public function collection(Collection $rows)
    {
        //Limpieza de datos
        $rows = Helper::clearArrayImport($rows);

        $this->rows = $rows;

        return true;
    }
}
