Skip to content

Commit

Permalink
Added import skip unknown sheets
Browse files Browse the repository at this point in the history
  • Loading branch information
CihanSenturk committed Jan 29, 2024
1 parent 33754a0 commit 57c5a00
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion app/Abstracts/ImportMultipleSheets.php
Expand Up @@ -5,9 +5,10 @@
use Illuminate\Contracts\Queue\ShouldQueue;
use Maatwebsite\Excel\Concerns\Importable;
use Maatwebsite\Excel\Concerns\WithChunkReading;
use Maatwebsite\Excel\Concerns\SkipsUnknownSheets;
use Maatwebsite\Excel\Concerns\WithMultipleSheets;

abstract class ImportMultipleSheets implements ShouldQueue, WithChunkReading, WithMultipleSheets
abstract class ImportMultipleSheets implements ShouldQueue, WithChunkReading, WithMultipleSheets, SkipsUnknownSheets
{
use Importable;

Expand All @@ -22,4 +23,9 @@ public function chunkSize(): int
{
return config('excel.imports.chunk_size');
}

public function onUnknownSheet($sheetName)
{
//
}
}

0 comments on commit 57c5a00

Please sign in to comment.