PHPackages                             pedram/multi-update - 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. [Utility &amp; Helpers](/categories/utility)
4. /
5. pedram/multi-update

ActiveLibrary[Utility &amp; Helpers](/categories/utility)

pedram/multi-update
===================

27PHP

Since Jun 1Pushed 2y ago1 watchersCompare

[ Source](https://github.com/pedram-davoodi/multi-update)[ Packagist](https://packagist.org/packages/pedram/multi-update)[ RSS](/packages/pedram-multi-update/feed)WikiDiscussions master Synced 1mo ago

READMEChangelogDependenciesVersions (1)Used By (0)

Multi-Update
============

[](#multi-update)

Multi-Update is a laravel package that allows you to update multiple rows in a database table with a single SQL statement. This package is useful when you need to update multiple rows with different values based on different conditions.

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

[](#installation)

You can install Multi-Update using Composer.

```
composer require pedram/multi-update
```

Usage
-----

[](#usage)

To use Multi-Update, you need to call the `updateMultipleRows` method on a model or a query builder instance. This method takes two parameters: an array of fields and their corresponding values to update, and a variable-length argument list of conditions to apply to the update statement.

```
use PedramD\MultiUpdate\MultiUpdate;

MyModel::updateMultipleRows($params, $condition1, $condition2, ...);
```

Here's an example of how you can use Multi-Update to update multiple rows in a database table:

```
use PedramD\MultiUpdate\MultiUpdate;

MyModel::updateMultipleRows([
    'column1' => [
        'condition1' => 'value1',
        'condition2' => 'value2',
        'condition3' => 'value3',
    ],
    'column2' => [
        'condition4' => 'new_value',
    ],
], 'column5 > 0', 'column6 = "some_value"');
```

In the above example, we are updating two columns `column1` and `column2`. The `column1` is updated based on three different conditions, and the `column2` is updated based on one condition. We have also added two additional conditions to apply to the update statement.

Contributing
------------

[](#contributing)

Contributions to Multi-Update are welcome and encouraged! If you find a bug or have a feature request, please open an issue on the GitHub repository. If you would like to contribute code, please fork the repository and submit a pull request.

When submitting a pull request, please make sure to follow the PSR-2 coding standards for any new functionality or bug fixes.

License
-------

[](#license)

Multi-Update is open-sourced software licensed under the [MIT license](https://opensource.org/licenses/MIT).

###  Health Score

15

—

LowBetter than 3% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity7

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity22

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.

### Community

Maintainers

![](https://www.gravatar.com/avatar/14a359424af0b6e82f5fdfd47dacbe683443a19f23f83a2598083cf648628174?d=identicon)[pedram-davoodi](/maintainers/pedram-davoodi)

---

Top Contributors

[![pedram-davoodi](https://avatars.githubusercontent.com/u/41471098?v=4)](https://github.com/pedram-davoodi "pedram-davoodi (15 commits)")

### Embed Badge

![Health badge](/badges/pedram-multi-update/health.svg)

```
[![Health](https://phpackages.com/badges/pedram-multi-update/health.svg)](https://phpackages.com/packages/pedram-multi-update)
```

###  Alternatives

[psr7-sessions/storageless

Storageless PSR-7 Session support

652373.0k8](/packages/psr7-sessions-storageless)[bryanjhv/slim-session

Session middleware and helper for Slim framework 4.

233961.5k16](/packages/bryanjhv-slim-session)[logiscape/mcp-sdk-php

Model Context Protocol SDK for PHP

36274.1k6](/packages/logiscape-mcp-sdk-php)[bepsvpt/blurhash

A PHP implementation of BlurHash with Laravel integration.

130259.9k5](/packages/bepsvpt-blurhash)[frosh/development-helper

Development Helper

90286.1k](/packages/frosh-development-helper)[worksome/coding-style

Worksomes coding style

49771.7k57](/packages/worksome-coding-style)

PHPackages © 2026

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