25 lines
498 B
PHP
25 lines
498 B
PHP
<?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),
|
|
];
|
|
}
|
|
}
|