| Conditions | 1 |
| Paths | 1 |
| Total Lines | 14 |
| Code Lines | 8 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 0 | ||
| 1 | <?php |
||
| 54 | public function dropAllTables() |
||
| 55 | { |
||
| 56 | Schema::disableForeignKeyConstraints(); |
||
| 57 | |||
| 58 | collect(DB::select('SHOW TABLES')) |
||
| 59 | ->map(function (stdClass $tableProperties) { |
||
| 60 | return get_object_vars($tableProperties)[key($tableProperties)]; |
||
| 61 | }) |
||
| 62 | ->each(function (string $tableName) { |
||
| 63 | Schema::drop($tableName); |
||
| 64 | }); |
||
| 65 | |||
| 66 | Schema::enableForeignKeyConstraints(); |
||
| 67 | } |
||
| 68 | } |
||
| 69 |