diff --git a/src/Imports/ModelManager.php b/src/Imports/ModelManager.php index fdc77b26..c3f97f1d 100644 --- a/src/Imports/ModelManager.php +++ b/src/Imports/ModelManager.php @@ -156,8 +156,8 @@ private function singleFlush(ToModel $import) return; } elseif ($import instanceof WithSkipDuplicates) { - $model::query()->insertOrIgnore([ $model->getAttributes() ]); - + $model::query()->insertOrIgnore([$model->getAttributes()]); + return; } diff --git a/tests/Concerns/WithSkipDuplicatesTest.php b/tests/Concerns/WithSkipDuplicatesTest.php index c3b4855a..dcdd1453 100644 --- a/tests/Concerns/WithSkipDuplicatesTest.php +++ b/tests/Concerns/WithSkipDuplicatesTest.php @@ -2,7 +2,6 @@ namespace Maatwebsite\Excel\Tests\Concerns; -use Illuminate\Database\Eloquent\Builder; use Illuminate\Database\Eloquent\Model; use Illuminate\Support\Facades\DB; use Maatwebsite\Excel\Concerns\Importable;