# fluent-cart/1.3.20/app/Models/Concerns/CanUpdateBatch.php

FluentCart A New Era of eCommerce – Faster, Lighter, and Simpler, version 1.3.20. 16 lines.

- Page: https://pluginprobe.com/plugins/fluent-cart/1.3.20/code/app/Models/Concerns/CanUpdateBatch.php
- Raw: https://pluginprobe.com/plugins/fluent-cart/1.3.20/raw/app/Models/Concerns/CanUpdateBatch.php
- Modified: 2025-10-14T16:36:46+00:00

Line numbers below start at 1. Link to a line or a range by appending a fragment to the
page URL, for example `https://pluginprobe.com/plugins/fluent-cart/1.3.20/code/app/Models/Concerns/CanUpdateBatch.php#L10-L20`.

```php
<?php

namespace FluentCart\App\Models\Concerns;

use FluentCart\App\Models\BatchQuery\Batch;
use FluentCart\Framework\Database\Orm\Builder;

trait CanUpdateBatch
{
    public static function scopeBatchUpdate(Builder $query, $values, $index = null)
    {
        $model = new static();
        $index = $index ?? $model->getKeyName();
        return (new Batch())->update($model, $values,$index);
    }
}
```
