From 22a25cb22cd5a98363174e05551f278970d01efe Mon Sep 17 00:00:00 2001 From: Roman Dubrovin Date: Tue, 17 Apr 2018 17:04:50 +0600 Subject: [PATCH] #-: fixed importers --- .../IncorrectImportFileException.php | 2 +- .../IncorrectImportLineException.php | 2 +- src/Exporters/Exporter.php | 2 +- src/HelpersServiceProvider.php | 8 ++++++-- src/Importers/Importer.php | 19 +++---------------- 5 files changed, 12 insertions(+), 21 deletions(-) diff --git a/src/Exceptions/IncorrectImportFileException.php b/src/Exceptions/IncorrectImportFileException.php index 3f828e62..d59a6c32 100644 --- a/src/Exceptions/IncorrectImportFileException.php +++ b/src/Exceptions/IncorrectImportFileException.php @@ -1,6 +1,6 @@ count == 0; }); - app(ExcelServiceProvider::class)->boot(); + app(ExcelServiceProvider::class, [ + 'app' => app() + ])->boot(); } public function register() { - app(ExcelServiceProvider::class)->register(); + app(ExcelServiceProvider::class, [ + 'app' => app() + ])->register(); } } \ No newline at end of file diff --git a/src/Importers/Importer.php b/src/Importers/Importer.php index 2f7bef99..af208ca1 100644 --- a/src/Importers/Importer.php +++ b/src/Importers/Importer.php @@ -1,10 +1,9 @@ createAllMarked(); $this->updateAllMarked(); - - $this->exportLogs(); } protected function prepareFields($line) @@ -211,16 +208,6 @@ protected function getDiff($item) return array_diff($exportedLine, $importedLine); } - public function exportLogs() - { - /** @var LogExporter $exporter */ - $exporter = app(LogExporter::class); - - $exporter->setReport($this->report); - - $this->report['log_file'] = $exporter->run(); - } - protected function validateHeader() { $line = $this->iterator->current();