How to delete all the rows in a table using Eloquent?

My guess was to use the following syntax:

MyModel::all()->delete();

But that did not work. I’m sure it’s super simple, but I’ve searched for documentation on the subject and can’t find it!

14 Answers
14

Leave a Comment