PHPackages                             rashiqulrony/laravel-csv-import - 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. [File &amp; Storage](/categories/file-storage)
4. /
5. rashiqulrony/laravel-csv-import

ActivePackage[File &amp; Storage](/categories/file-storage)

rashiqulrony/laravel-csv-import
===============================

Import Very Large CSV Without File Store and Chunk Upload system Laravel package to export and import CSV files in a memory-optimized way

v1.0.0(1y ago)14MITPHPPHP ^7.0|^8.0

Since Jul 1Pushed 1y agoCompare

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

READMEChangelogDependencies (1)Versions (2)Used By (0)

Laravel CSV Import
==================

[](#laravel-csv-import)

[![License: MIT](https://camo.githubusercontent.com/7013272bd27ece47364536a221edb554cd69683b68a46fc0ee96881174c4214c/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f6c6963656e73652d4d49542d626c75652e737667)](LICENSE)

A Laravel package to **import large CSV files** efficiently using **chunked memory processing**, **on-the-fly UTF-8 conversion**, and **no temporary storage overhead**.

---

📦 Installation
--------------

[](#-installation)

Install via Composer:

```
composer require rashiqulrony/laravel-csv-import
```

If you're using Laravel &lt;5.5 or your Laravel version doesn't support package auto-discovery, add the service provider manually:

```
// config/app.php
'providers' => [
    Rashiqulrony\CSVImport\Providers\AppServiceProvider::class,
];
```

⚙️ Configuration
----------------

[](#️-configuration)

###### Publish the config file (optional):

[](#publish-the-config-file-optional)

```
php artisan vendor:publish --provider="Rashiqulrony\CSVImport\Providers\AppServiceProvider" --tag=config
```

This creates a file: config/csvimport.php

```
return [
    'chunk_size' => 200, // Number of rows to return per batch
];
```

🚀 Usage
=======

[](#-usage)

✅ Basic Example
---------------

[](#-basic-example)

```
use Rashiqulrony\CSVImport;

public function upload(Request $request)
{
    $request->validate([
        'file' => 'required|file|mimes:csv',
    ]);

    $result = CSVImport::upload($request->file('file'));

    if (!empty($result) && is_array($result)) {
         foreach ($result as $key => $value) {
              foreach ($result[$key] as $data) {
                 // Process or save the row (e.g. DB::table(...)->insert($row))
              }
         }
    } else {
         return back()->with('error', 'Data not found or invalid file.');
    }

    return back()->with('success', 'CSV imported successfully!');
}
```

📥 Method: CSVImport::upload($file)
----------------------------------

[](#-method-csvimportuploadfile)

ReturnsDescription`array`On success: returns a chunk of rows (associative arrays).`['status' => false, 'message' => '...']`On failure.✅ Features
----------

[](#-features)

- Detects and converts multiple encodings to UTF-8
- Skips invalid rows (missing fields, malformed headers)
- Efficient memory usage with chunking
- No need to manually store or manage temp files

🧪 Supported Encodings
---------------------

[](#-supported-encodings)

- UTF-8
- UTF-16LE / UTF-16BE
- Windows-1252
- ISO-8859-1

📂 Directory Structure
---------------------

[](#-directory-structure)

```
laravel-csv-import/
├── src/
│   ├── CSVImport.php
│   └── Providers/
│       └── AppServiceProvider.php
├── config/
│   └── csvimport.php
├── composer.json
└── README.md

```

📝 License
---------

[](#-license)

###### This package is open-sourced software licensed under the MIT license.

[](#this-package-is-open-sourced-software-licensed-under-the-mit-license)

👤 Author
--------

[](#-author)

```
Rashiqul Rony
📧 rashiqulrony@gmail.com
🔗 github.com/rashiqulrony

```

###  Health Score

27

—

LowBetter than 47% of packages

Maintenance49

Moderate activity, may be stable

Popularity5

Limited adoption so far

Community2

Small or concentrated contributor base

Maturity42

Maturing project, gaining track record

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

Unknown

Total

1

Last Release

369d ago

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/26733567?v=4)[Rashiqul Rony](/maintainers/rashiqulrony)[@RashiqulRony](https://github.com/RashiqulRony)

---

Tags

csv-importRashiqulRonycsv to arraylaravel csvcsv packagelaravel csv importUpload system

### Embed Badge

![Health badge](/badges/rashiqulrony-laravel-csv-import/health.svg)

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

###  Alternatives

[statamic-rad-pack/runway

Eloquently manage your database models in Statamic.

135224.7k7](/packages/statamic-rad-pack-runway)[api-platform/laravel

API Platform support for Laravel

58171.6k14](/packages/api-platform-laravel)[ecotone/laravel

Ecotone for Laravel — CQRS, Event Sourcing, Sagas, Durable Workflows, and Outbox on top of Laravel Queue, via PHP attributes.

21318.6k3](/packages/ecotone-laravel)[duncanmcclean/statamic-cargo

Comprehensive e-commerce addon for Statamic. Build bespoke e-commerce sites without the complexity.

3417.0k](/packages/duncanmcclean-statamic-cargo)[slimani/filament-media-manager

A media manager plugin for Filament.

126.9k](/packages/slimani-filament-media-manager)

PHPackages © 2026

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