| @@ 40-51 (lines=12) @@ | ||
| 37 | /** |
|
| 38 | * run package database migrations. |
|
| 39 | */ |
|
| 40 | public function migrate() |
|
| 41 | { |
|
| 42 | $fileSystem = new Filesystem(); |
|
| 43 | $classFinder = new ClassFinder(); |
|
| 44 | ||
| 45 | foreach ($fileSystem->files(__DIR__.'/../../../../tests/NilPortugues/Laravel5/JsonApi/Migrations') as $file) { |
|
| 46 | $fileSystem->requireOnce($file); |
|
| 47 | $migrationClass = $classFinder->findClass($file); |
|
| 48 | ||
| 49 | (new $migrationClass())->up(); |
|
| 50 | } |
|
| 51 | } |
|
| 52 | ||
| 53 | /** |
|
| 54 | * |
|
| @@ 65-76 (lines=12) @@ | ||
| 62 | /** |
|
| 63 | * run package database migrations. |
|
| 64 | */ |
|
| 65 | public function destroy() |
|
| 66 | { |
|
| 67 | $fileSystem = new Filesystem(); |
|
| 68 | $classFinder = new ClassFinder(); |
|
| 69 | ||
| 70 | foreach ($fileSystem->files(__DIR__.'/../../../../tests/NilPortugues/Laravel5/JsonApi/Migrations') as $file) { |
|
| 71 | $fileSystem->requireOnce($file); |
|
| 72 | $migrationClass = $classFinder->findClass($file); |
|
| 73 | ||
| 74 | (new $migrationClass())->down(); |
|
| 75 | } |
|
| 76 | } |
|
| 77 | ||
| 78 | /** |
|
| 79 | * Boots the application. |
|