Laravel Mass Update is a fantastic package that helps to update multiple Laravel Model records, each with its own set of values, sending a single query to your database! In your model class, add the Iksaku\Laravel\MassUpdate\MassUpdatable trait: use Illuminate\Database\Eloquent\Model; use Iksaku\Laravel\MassUpdate\MassUpdatable; class User extends Model { use MassUpdatable; //... } Your model is now ready to update multiple records with varying values in a single query! Let's take a look at some possible use cases for this new query: Simple use case Update the values of multiple records.
If you need to update the values in some Model classes and want to automatically mass update those changes, then this is for you!