Akaunting/app/Abstracts/ImportMultipleSheets.php

32 lines
685 B
PHP
Raw Normal View History

<?php
namespace App\Abstracts;
use Illuminate\Contracts\Queue\ShouldQueue;
use Maatwebsite\Excel\Concerns\Importable;
use Maatwebsite\Excel\Concerns\WithChunkReading;
2024-01-29 14:02:01 +00:00
use Maatwebsite\Excel\Concerns\SkipsUnknownSheets;
use Maatwebsite\Excel\Concerns\WithMultipleSheets;
2024-01-29 14:02:01 +00:00
abstract class ImportMultipleSheets implements ShouldQueue, WithChunkReading, WithMultipleSheets, SkipsUnknownSheets
{
use Importable;
public $user;
public function __construct()
{
$this->user = user();
}
public function chunkSize(): int
{
2023-05-18 11:23:17 +00:00
return config('excel.imports.chunk_size');
}
2024-01-29 14:02:01 +00:00
public function onUnknownSheet($sheetName)
{
//
}
}