diff --git a/extend/catcher/command/Tools/CreateTableCommand.php b/extend/catcher/command/Tools/CreateTableCommand.php index d566c12..c79c4a8 100644 --- a/extend/catcher/command/Tools/CreateTableCommand.php +++ b/extend/catcher/command/Tools/CreateTableCommand.php @@ -36,7 +36,7 @@ class CreateTableCommand extends Command FileSystem::put( CatchAdmin::moduleDirectory($module) . 'tables' . DIRECTORY_SEPARATOR . (ucwords($table) . '.php'), - $this->tableTemp($module, lcfirst($table), $form) + $this->tableTemp($module, ucwords($table), $form) ); if (! $form) { @@ -44,7 +44,7 @@ class CreateTableCommand extends Command CatchAdmin::moduleDirectory($module) . 'tables' . DIRECTORY_SEPARATOR . 'forms' . DIRECTORY_SEPARATOR . (ucwords($table) . '.php'), - $this->formTemp($module, lcfirst($table)) + $this->formTemp($module, ucwords($table)) ); } @@ -54,7 +54,9 @@ class CreateTableCommand extends Command protected function tableTemp($module, $table, $form) { - $formTemp = ! $form ? sprintf('Factory::create(\'%s\');', $table) : '[];'; + $_table = lcfirst($table); + + $formTemp = ! $form ? sprintf('Factory::create(\'%s\');', $_table) : '[];'; return <<getTable('{$table}'); + return \$this->getTable('{$_table}'); } protected function form()