Conditions | 1 |
Paths | 1 |
Total Lines | 14 |
Lines | 0 |
Ratio | 0 % |
Changes | 0 |
1 | <?php |
||
11 | public function dropAllTables() |
||
12 | { |
||
13 | Schema::disableForeignKeyConstraints(); |
||
14 | |||
15 | collect(DB::select("SHOW FULL TABLES WHERE Table_Type = 'BASE TABLE'")) |
||
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 |