PHPackages                             dmt-software/laravel-import-reader - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [PDF &amp; Document Generation](/categories/documents)
4. /
5. dmt-software/laravel-import-reader

ActiveLibrary[PDF &amp; Document Generation](/categories/documents)

dmt-software/laravel-import-reader
==================================

import reader that can handles huge imports

v0.2.1(3y ago)04MITPHP

Since Nov 15Pushed 3y ago1 watchersCompare

[ Source](https://github.com/dmt-software/laravel-import-reader)[ Packagist](https://packagist.org/packages/dmt-software/laravel-import-reader)[ RSS](/packages/dmt-software-laravel-import-reader/feed)WikiDiscussions master Synced today

READMEChangelog (3)Dependencies (3)Versions (4)Used By (0)

Laravel Import Reader
=====================

[](#laravel-import-reader)

Laravel bridge for `dmt-software/import-reader` to iterate over the contents of (huge) imports.

Support
-------

[](#support)

This package is tested on and requires laravel &gt;= 8.0.

Installation
------------

[](#installation)

`composer require dmt-software/laravel-import-reader`

The service provider can be automatically registered by auto-discovery. Otherwise, register it manually add it to *config/app.php*:

```
'providers' => [
    // ...
    DMT\Laravel\Import\Reader\Providers\ImportReaderServiceProvider::class,
];
```

To publish the configuration file:

`php artisan vendor:publish --provider="DMT\Laravel\Import\Reader\Providers\ImportReaderServiceProvider"`

Configuration
-------------

[](#configuration)

The configuration has entries for custom sanitizers, handlers and a custom error handler. See the *config/reader.php* file for their usage or the `dmt-software/import-reader` documentation.

Usage
-----

[](#usage)

A file called *items.json* contains the following data:

```
[
  {
    "id": 1,
    "name": "item-name",
    // ...
  },
  {
    "id": 2,
    "name": "item2-name",
    // ...
  },
  // ...
]
```

That can be read into chunks that can be imported into a database:

```
use DMT\Laravel\Import\Reader\Facades\ImportReader;

/** @var iterable $items */
$items = ImportReader::buildToArrayReader(
    'directory-to/items.json', [
        'path' => '.'
    ])->read();

foreach ($items as $row => $item) {
    // process the items
    if (!empty($item['name'])) {
        Item::updateOrCreate($item);
    }
}
```

Or the reader builder can be injected into your classes or methods.

```
use DMT\Import\Reader\ReaderBuilder;
use Illuminate\Console\Command;

class MyImportCommand extends Command
{
    protected $signature = 'import:items {file}';

    public function handle(ReaderBuilder $builder)
    {
        $reader = $builder->build($this->argument('file'), []);

        foreach ($reader->read($this->argument('skip')) as $item) {
            // process item
        }
    }
}
```

###  Health Score

19

—

LowBetter than 9% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity3

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity39

Early-stage or recently created project

 Bus Factor1

Top contributor holds 100% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Every ~53 days

Total

3

Last Release

1221d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/ec6b7fbb4d231b5c2c76348cf3a13ec5e82c64a1826142f6ec0db1cf15db2873?d=identicon)[proggeler](/maintainers/proggeler)

---

Top Contributors

[![proggeler](https://avatars.githubusercontent.com/u/18281353?v=4)](https://github.com/proggeler "proggeler (10 commits)")

---

Tags

jsonlaravelxmlcsvimport

### Embed Badge

![Health badge](/badges/dmt-software-laravel-import-reader/health.svg)

```
[![Health](https://phpackages.com/badges/dmt-software-laravel-import-reader/health.svg)](https://phpackages.com/packages/dmt-software-laravel-import-reader)
```

###  Alternatives

[rodenastyle/stream-parser

PHP Multiformat Streaming Parser

447204.3k2](/packages/rodenastyle-stream-parser)[ee/dataexporter-bundle

Easy export data to CSV, XML, HTML, JSON or XLS

4982.9k](/packages/ee-dataexporter-bundle)[initred/laravel-tabula

laravel-tabula is a tool for liberating data tables trapped inside PDF files for the Laravel framework.

1418.6k](/packages/initred-laravel-tabula)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
