Support the ongoing development of Laravel.io →
Database Eloquent
Last updated 2 years ago.
0

This doesn't delete the table, it deletes all the rows contained in the specified table. It's up to you to decide if and when you would use this. http://laravel.com/docs/queries#deletes

Usually, a seeder is loading reference/lookup data, so to ensure there are no duplicates you would first empty the table using this command.

Last updated 2 years ago.
0

In addition to the above reference/lookup data, its often really nice for manual testing/debugging reasons to know that you're working with a clean database.

Last updated 2 years ago.
0

Sign in to participate in this thread!

Eventy

Your banner here too?

VOiD289 void289 Joined 28 Apr 2014

Moderators

We'd like to thank these amazing companies for supporting us

Your logo here?

Laravel.io

The Laravel portal for problem solving, knowledge sharing and community building.

© 2024 Laravel.io - All rights reserved.