Skip to content

Commit

Permalink
fixed genereting disabled files
Browse files Browse the repository at this point in the history
  • Loading branch information
denisdulici committed Nov 7, 2019
1 parent cb4127a commit f56c413
Showing 1 changed file with 22 additions and 16 deletions.
38 changes: 22 additions & 16 deletions src/Generators/ModuleGenerator.php
Original file line number Diff line number Diff line change
Expand Up @@ -322,22 +322,28 @@ public function generateFiles()
*/
public function generateResources()
{
$this->console->call('module:make-seed', [
'name' => $this->getName(),
'alias' => $this->alias,
'--master' => true,
]);

$this->console->call('module:make-provider', [
'name' => 'Main',
'alias' => $this->alias,
'--master' => true,
]);

$this->console->call('module:make-controller', [
'controller' => 'Main',
'alias' => $this->alias,
]);
if (GenerateConfigReader::read('seeder')->generate() === true) {
$this->console->call('module:make-seed', [
'name' => $this->getName(),
'alias' => $this->alias,
'--master' => true,
]);
}

if (GenerateConfigReader::read('provider')->generate() === true) {
$this->console->call('module:make-provider', [
'name' => 'Main',
'alias' => $this->alias,
'--master' => true,
]);
}

if (GenerateConfigReader::read('controller')->generate() === true) {
$this->console->call('module:make-controller', [
'controller' => 'Main',
'alias' => $this->alias,
]);
}
}

/**
Expand Down

0 comments on commit f56c413

Please sign in to comment.