Conditions | 2 |
Paths | 2 |
Total Lines | 18 |
Lines | 0 |
Ratio | 0 % |
Changes | 0 |
1 | <?php |
||
26 | public function down($migration) |
||
27 | { |
||
28 | $file = "$this->path/$migration"; |
||
29 | |||
30 | require_once $file; |
||
31 | |||
32 | Migration::where('migration', pathinfo($migration, PATHINFO_FILENAME))->delete(); |
||
33 | |||
34 | $migration = ClassReader::getClassName($file); |
||
35 | |||
36 | try { |
||
37 | (new $migration)->down(); |
||
38 | } |
||
39 | /** |
||
40 | * Dont stop if the down method throws an exception |
||
41 | */ |
||
42 | catch (\Throwable $e) {} |
||
|
|||
43 | } |
||
44 | } |
||
45 |