Added read invoice import class

This commit is contained in:
dhanabalan
2025-04-19 12:41:19 +05:30
parent f4fcc20a4f
commit af506b19fc

View File

@@ -0,0 +1,26 @@
<?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;
}
}