PHPackages                             hareku/laravel-bulk - 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. [Database &amp; ORM](/categories/database)
4. /
5. hareku/laravel-bulk

ActiveLibrary[Database &amp; ORM](/categories/database)

hareku/laravel-bulk
===================

The Laravel package for bulk insert/update.

v0.4.0(1y ago)1497MITPHPPHP ^7.3|^8.0CI failing

Since Mar 6Pushed 1y ago1 watchersCompare

[ Source](https://github.com/hareku/laravel-bulk)[ Packagist](https://packagist.org/packages/hareku/laravel-bulk)[ RSS](/packages/hareku-laravel-bulk/feed)WikiDiscussions main Synced 3w ago

READMEChangelogDependencies (5)Versions (12)Used By (0)

laravel-bulk
============

[](#laravel-bulk)

[![testing](https://github.com/hareku/laravel-bulk/actions/workflows/testing.yml/badge.svg)](https://github.com/hareku/laravel-bulk/actions/workflows/testing.yml)

`laravel-bulk` provides functions that execute bulk insert/update.

Packagist:

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

[](#installation)

Composer: `composer require hareku/laravel-bulk`.

Usage
-----

[](#usage)

### EloquentBulk

[](#eloquentbulk)

`EloquentBulk` provides bulk functions for Eloquent models.

```
use Hareku\Bulk\Facades\EloquentBulk;

// \Illuminate\Database\Eloquent\Model
$model = new \App\Models\User;

$columns = ['name', 'age'];
$records = [
    ['john', 22],
    ['james', 23],
];

// EloquentBulk automatically resolves the table name,
// and fills `created_at` and `updated_at` columns.
EloquentBulk::insert($model, $columns, $records);

dump(User::all());
// [
//     {
//         id: 1,
//         name: john,
//         age: 22,
//         created_at: 2020-01-01 12:00:00,
//         updated_at: 2020-01-01 12:00:00
//     },
//     {
//         id: 2,
//         name: james,
//         age: 23,
//         created_at: 2020-01-01 12:00:00,
//         updated_at: 2020-01-01 12:00:00
//     },
// ]

$indices = ['id'];

// each record must have indices for sql's WHERE conditions.
$newRecords = [
    [
        'id' => 1,
        'name' => 'new_john',
        'age' => 25,
    ],
    [
        'id' => 2,
        'name' => 'new_james',
    ],
];

EloquentBulk::update($model, $indices, $newRecords);

dump(User::all());
// [
//     {
//         id: 1,
//         name: new_john,
//         age: 25,
//         created_at: 2020-01-01 12:00:00,
//         updated_at: 2020-12-01 12:00:00
//     },
//     {
//         id: 2,
//         name: new_james,
//         age: 23,
//         created_at: 2020-01-01 12:00:00,
//         updated_at: 2020-12-01 12:00:00
//     },
// ]
```

### BulkProcessor

[](#bulkprocessor)

`BulkProcessor` provides functions without Eloquent features (auto resolving table names, and filling timestamp columns). So you have to give the table name.

```
use Hareku\Bulk\Facades\BulkProcessor;

BulkProcessor::insert($tableName, $columns, $records);
BulkProcessor::update($tableName, $indices, $records);
```

Contribution
------------

[](#contribution)

Please open an issue or a pull request.

### Local development

[](#local-development)

You can develop on VSCode remote container that already installed PHP and other dependencies. Otherwise, you have to install PHP and composer to the local, or run tests on Github Actions.

- Install dependencies: `composer install`
- Test with PHPUnit: `composer test`
- Test with PHPUnit and Xdebug coverage: `composer test:coverage-text` or `composer test:coverage-html`

###  Health Score

33

—

LowBetter than 72% of packages

Maintenance45

Moderate activity, may be stable

Popularity14

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity55

Maturing project, gaining track record

 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 ~189 days

Recently: every ~378 days

Total

9

Last Release

431d ago

PHP version history (2 changes)0.1.0PHP ^7.3|^8.0

0.2.1PHP ^7.2|^8.0

### Community

Maintainers

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

---

Top Contributors

[![hareku](https://avatars.githubusercontent.com/u/17667652?v=4)](https://github.com/hareku "hareku (39 commits)")

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/hareku-laravel-bulk/health.svg)

```
[![Health](https://phpackages.com/badges/hareku-laravel-bulk/health.svg)](https://phpackages.com/packages/hareku-laravel-bulk)
```

###  Alternatives

[psalm/plugin-laravel

Psalm plugin for Laravel

3355.3M346](/packages/psalm-plugin-laravel)[laravel/ai

The official AI SDK for Laravel.

1.0k3.2M194](/packages/laravel-ai)[illuminate/database

The Illuminate Database package.

2.8k54.9M11.6k](/packages/illuminate-database)[illuminate/queue

The Illuminate Queue package.

21332.6M1.6k](/packages/illuminate-queue)[api-platform/laravel

API Platform support for Laravel

58171.4k14](/packages/api-platform-laravel)[yajra/laravel-oci8

Oracle DB driver for Laravel via OCI8

8793.2M25](/packages/yajra-laravel-oci8)

PHPackages © 2026

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