Add Model::deleteAll and Model::forceDeleteAll #55102
Unanswered
luisscruza
asked this question in
Ideas
Replies: 1 comment
-
Using |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
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