| Conditions | 2 |
| Paths | 2 |
| Total Lines | 17 |
| Code Lines | 7 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 4 | ||
| Bugs | 0 | Features | 0 |
| 1 | <?php |
||
| 24 | protected function writeMigration($name, $table = null, $create = null) |
||
| 25 | { |
||
| 26 | // Needed for Laravel 6 and 7 support. Laravel 8 handles creating folder automatically |
||
| 27 | // @codeCoverageIgnoreStart |
||
| 28 | if (! file_exists(database_path('content-migrations')) { |
||
| 29 | mkdir(database_path('content-migrations'), 0755); |
||
|
|
|||
| 30 | } |
||
| 31 | // @codeCoverageIgnoreEnd |
||
| 32 | |||
| 33 | $file = $this->creator->create( |
||
| 34 | $name, |
||
| 35 | $this->laravel->databasePath() . DIRECTORY_SEPARATOR . 'content-migrations' |
||
| 36 | ); |
||
| 37 | |||
| 38 | $fileName = basename($file); |
||
| 39 | |||
| 40 | $this->line("<info>Created Content Migration:</info> {$fileName}"); |
||
| 41 | } |
||
| 43 |