Created
July 17, 2016 19:02
-
-
Save naneri/5d035b09ae5b65455e350494a49bf630 to your computer and use it in GitHub Desktop.
Drop all tables in Laravel
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
foreach(\DB::select('SHOW TABLES') as $table) { | |
$table_array = get_object_vars($table); | |
\Schema::drop($table_array[key($table_array)]); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment