app/src/Console/Commands/GenerateMigrationCommand.php 1 location
|
@@ 96-106 (lines=11) @@
|
93 |
|
* @return string |
94 |
|
* @throws \Exception |
95 |
|
*/ |
96 |
|
private function getPathForMigration($migrationName) |
97 |
|
{ |
98 |
|
$dir = rtrim(MIGRATIONS_PATH, '/'); |
99 |
|
if (!file_exists($dir)) { |
100 |
|
throw new \Exception(sprintf('Migration directory "%s" does not exist.', $dir)); |
101 |
|
} |
102 |
|
|
103 |
|
$baseName = date('YmdHis') . '_' . $migrationName . '.php'; |
104 |
|
|
105 |
|
return $dir . '/' . $baseName; |
106 |
|
} |
107 |
|
} |
108 |
|
|
app/src/Console/Commands/GenerateSeedCommand.php 1 location
|
@@ 93-103 (lines=11) @@
|
90 |
|
* @return string |
91 |
|
* @throws \Exception |
92 |
|
*/ |
93 |
|
private function getPathForSeed($seedName) |
94 |
|
{ |
95 |
|
$dir = rtrim(SEEDS_PATH, '/'); |
96 |
|
if (!file_exists($dir)) { |
97 |
|
throw new \Exception(sprintf('Seed directory "%s" does not exist.', $dir)); |
98 |
|
} |
99 |
|
|
100 |
|
$baseName = date('YmdHis') . '_' . $seedName . '.php'; |
101 |
|
|
102 |
|
return $dir . '/' . $baseName; |
103 |
|
} |
104 |
|
} |
105 |
|
|