Add Model::deleteAll and Model::forceDeleteAll #55102
Unanswered
luisscruza
asked this question in
Ideas
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
What do you think of adding a
Model::deleteAll
andModel::forceDeleteAll
method to the Model?Right now, we can do
Model::query()->truncate();
to delete all records from a table, but this also resets the identity order of the table.It can be useful to just do
Model::deleteAll
and keep the same identity going on the new created records.Should this be worth a PR?
Beta Was this translation helpful? Give feedback.
All reactions