Browse Source

Move migration and factory stubs to database directory

tags/1.1.6
Nafies Luthfi 8 years ago
parent
commit
14ee7edacd
  1. 2
      src/Generators/MigrationGenerator.php
  2. 2
      src/Generators/ModelFactoryGenerator.php
  3. 0
      src/stubs/database/factories/model-factory.stub
  4. 0
      src/stubs/database/migrations/migration-create.stub

2
src/Generators/MigrationGenerator.php

@ -18,7 +18,7 @@ class MigrationGenerator extends BaseGenerator
$migrationPath = $this->makeDirectory(database_path('migrations'));
$migrationFilePath = $migrationPath.'/'.$prefix."_create_{$tableName}_table.php";
$this->generateFile($migrationFilePath, $this->getContent('migration-create'));
$this->generateFile($migrationFilePath, $this->getContent('database/migrations/migration-create'));
$this->command->info($this->modelNames['model_name'].' table migration generated.');
}

2
src/Generators/ModelFactoryGenerator.php

@ -16,7 +16,7 @@ class ModelFactoryGenerator extends BaseGenerator
$this->generateFile(
$modelFactoryPath.'/'.$this->modelNames['model_name'].'Factory.php',
$this->getContent('model-factory')
$this->getContent('database/factories/model-factory')
);
$this->command->info($this->modelNames['model_name'].' model factory generated.');

0
src/stubs/model-factory.stub → src/stubs/database/factories/model-factory.stub

0
src/stubs/migration-create.stub → src/stubs/database/migrations/migration-create.stub

Loading…
Cancel
Save