<?php

namespace App\Imports;

use Illuminate\Support\Collection;
use Maatwebsite\Excel\Concerns\ToCollection;

class ExcelImport implements ToCollection
{
    public $rows = [];

    /**
    * @param Collection $collection
    */
    public function collection(Collection $collection)
    {
        foreach($collection as $item) {
            self::$rows[] = $item->toArray();
        }
    }

    public function getRows()
    {
        return self::$rows;
    }
}
