Skip to content

[FEATURE] Model Class: updateWhere()  #572

Closed
@timothymarois

Description

@timothymarois

I noticed we have a deleteWhere() on the model class. However the only way you can do an update() is by primary key, so it only makes sense to have an updater for batch changes.

updateWhere(array, array)

If i'm mistaken let me know, but as for the docs and the source code, doesn't appear to be a batch update method. I also know the builder includes the ->where()->update() however, that's not accessible from model, or at least not in the documentation. Thoughts?

And yeah you could use the save() method to accomplish most, but there is occasions where a simple updateWhere() could come in handy for quick updates across the table.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions