Skip to content

Instantly share code, notes, and snippets.

@naneri
Created July 17, 2016 19:02
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save naneri/5d035b09ae5b65455e350494a49bf630 to your computer and use it in GitHub Desktop.
Save naneri/5d035b09ae5b65455e350494a49bf630 to your computer and use it in GitHub Desktop.
Drop all tables in Laravel
<?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