1
0
forked from poc/pds
Files
poc-pds1/app/Imports/ExcelImport.php
2025-04-19 12:41:19 +05:30

27 lines
467 B
PHP

<?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;
}
}