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. hareku/laravel-bulk

ActiveLibrary

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 today

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

34

—

LowBetter than 77% of packages

Maintenance49

Moderate activity, may be stable

Popularity14

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity54

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

376d 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

[spatie/laravel-health

Monitor the health of a Laravel application

85810.0M83](/packages/spatie-laravel-health)[watson/validating

Eloquent model validating trait.

9723.3M46](/packages/watson-validating)[clickbar/laravel-magellan

This package provides functionality for working with the postgis extension in Laravel.

423715.4k1](/packages/clickbar-laravel-magellan)[reedware/laravel-relation-joins

Adds the ability to join on a relationship by name.

2121.2M13](/packages/reedware-laravel-relation-joins)[pressbooks/pressbooks

Pressbooks is an open source book publishing tool built on a WordPress multisite platform. Pressbooks outputs books in multiple formats, including PDF, EPUB, web, and a variety of XML flavours, using a theming/templating system, driven by CSS.

44643.1k1](/packages/pressbooks-pressbooks)[api-platform/laravel

API Platform support for Laravel

59126.4k6](/packages/api-platform-laravel)

PHPackages © 2026

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