Download the PHP package jhavenz/laravel-batch-update without Composer
On this page you can find all versions of the php package jhavenz/laravel-batch-update. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download jhavenz/laravel-batch-update
More information about jhavenz/laravel-batch-update
Files in jhavenz/laravel-batch-update
Package laravel-batch-update
Short Description batch updates for Eloquent models
License MIT
Homepage https://github.com/jhavenz/laravel-batch-update
Informations about the package laravel-batch-update
Laravel Batch Updates
There's always been a missing bit when you want don't want to 'upsert', which Laravel covers, and you don't want to 'insert'. When you just need to 'update' all the rows, each having their own varying data set, then this package will help you out.
Requirements
- PHP: >= 8.1
Installation
You can install the package via composer:
Usage
Notes:
- This package has been used a bit in my projects and is working nicely so far, but it's still in an infant and I have to write the test suite. Please lmk if you see an issue or have an idea to add.
- I'm aware that I'm bypassing the bindings as I'm building the query, but since I'm generally using this logic when I wan to map 100s of rows, then fire the query off, I've hit limitations against the database where there's 'too many bindings' for the db engine to handle.
Thoughts?.. It's better like this, right? Unless, of course, you're passing user input to your db... in that case, I can't imagine you'd be batch updating while the user is waiting anyway.
Update multiple rows, each having their own values..and you only want to update: (not updateOrCreate, upsert, findOrCreate, etc.) e.g.
Testing
Changelog
Please see CHANGELOG for more information on what has changed recently.
Contributing
Please see CONTRIBUTING for details.
Security Vulnerabilities
Please review our security policy on how to report security vulnerabilities.
Credits
License
The MIT License (MIT). Please see License File for more information.