2019-11-16 10:21:14 +03:00
|
|
|
<?php
|
|
|
|
|
|
|
|
namespace App\Imports\Common;
|
|
|
|
|
2020-12-21 11:24:38 +03:00
|
|
|
use App\Imports\Common\Sheets\Items as Base;
|
|
|
|
use App\Imports\Common\Sheets\ItemTaxes;
|
2021-05-23 02:27:44 +03:00
|
|
|
use Illuminate\Contracts\Queue\ShouldQueue;
|
2021-04-18 02:47:02 +03:00
|
|
|
use Maatwebsite\Excel\Concerns\Importable;
|
2021-05-23 02:27:44 +03:00
|
|
|
use Maatwebsite\Excel\Concerns\WithChunkReading;
|
2020-12-21 11:24:38 +03:00
|
|
|
use Maatwebsite\Excel\Concerns\WithMultipleSheets;
|
2019-11-16 10:21:14 +03:00
|
|
|
|
2021-05-23 02:27:44 +03:00
|
|
|
class Items implements ShouldQueue, WithChunkReading, WithMultipleSheets
|
2019-11-16 10:21:14 +03:00
|
|
|
{
|
2021-04-18 02:47:02 +03:00
|
|
|
use Importable;
|
|
|
|
|
2020-12-21 11:24:38 +03:00
|
|
|
public function sheets(): array
|
2019-11-16 10:21:14 +03:00
|
|
|
{
|
2020-12-21 11:24:38 +03:00
|
|
|
return [
|
|
|
|
'items' => new Base(),
|
|
|
|
'item_taxes' => new ItemTaxes(),
|
|
|
|
];
|
2019-11-16 10:21:14 +03:00
|
|
|
}
|
2021-05-23 02:27:44 +03:00
|
|
|
|
|
|
|
public function chunkSize(): int
|
|
|
|
{
|
|
|
|
return 100;
|
|
|
|
}
|
2019-11-16 10:21:14 +03:00
|
|
|
}
|