Files
star-erp/app/Modules/Sales/Imports/SalesImport.php

25 lines
498 B
PHP
Raw Normal View History

<?php
namespace App\Modules\Sales\Imports;
use App\Modules\Sales\Models\SalesImportBatch;
use Maatwebsite\Excel\Concerns\WithMultipleSheets;
class SalesImport implements WithMultipleSheets
{
protected $batch;
public function __construct(SalesImportBatch $batch)
{
$this->batch = $batch;
}
public function sheets(): array
{
// Only import the first sheet (index 0)
return [
0 => new SalesImportSheet($this->batch),
];
}
}