| Conditions | 1 |
| Paths | 1 |
| Total Lines | 14 |
| Code Lines | 8 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 0 | ||
| 1 | <?php |
||
| 11 | public function dropAllTables() |
||
| 12 | { |
||
| 13 | Schema::disableForeignKeyConstraints(); |
||
| 14 | |||
| 15 | collect(DB::select('SHOW TABLES')) |
||
| 16 | ->map(function (stdClass $tableProperties) { |
||
| 17 | return get_object_vars($tableProperties)[key($tableProperties)]; |
||
| 18 | }) |
||
| 19 | ->each(function (string $tableName) { |
||
| 20 | Schema::drop($tableName); |
||
| 21 | }); |
||
| 22 | |||
| 23 | Schema::enableForeignKeyConstraints(); |
||
| 24 | } |
||
| 25 | } |
||
| 26 |