Skip to content

Commit

Permalink
rollback include datatable file
Browse files Browse the repository at this point in the history
  • Loading branch information
handiwijoyo committed Sep 19, 2016
1 parent 24ed332 commit db10204
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion src/Generators/Scaffold/ControllerGenerator.php
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,7 @@ private function generateDataTable()

FileUtil::createFile($path, $fileName, $templateData);

$this->commandData->commandComment("\n$fileName created: ");
$this->commandData->commandComment("\nDataTable created: ");
$this->commandData->commandInfo($fileName);
}

Expand All @@ -95,5 +95,11 @@ public function rollback()
if ($this->rollbackFile($this->path, $this->fileName)) {
$this->commandData->commandComment('Controller file deleted: '.$this->fileName);
}

if ($this->commandData->getAddOn('datatables')) {
if ($this->rollbackFile($this->commandData->config->pathDataTables, $this->commandData->modelName.'DataTable.php')) {
$this->commandData->commandComment('DataTable file deleted: '.$this->fileName);
}
}
}
}

0 comments on commit db10204

Please sign in to comment.