Skip to content

Commit

Permalink
Merge pull request #184 from StalkAlex/patch-1
Browse files Browse the repository at this point in the history
Apply cutom model name in UI giiant
  • Loading branch information
schmunk42 authored Oct 27, 2016
2 parents d842bfa + f57d405 commit 16d7eb1
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/generators/model/Generator.php
Original file line number Diff line number Diff line change
Expand Up @@ -246,7 +246,10 @@ public function generate()
foreach ($this->getTableNames() as $tableName) {
list($relations, $translations) = array_values($this->extractTranslations($tableName, $relations));
//var_dump($relations,$tableName);exit;
$className = $this->generateClassName($tableName);
$className = php_sapi_name() === 'cli'
? $this->generateClassName($tableName)
: $this->modelClass;

$queryClassName = ($this->generateQuery) ? $this->generateQueryClassName($className) : false;
$tableSchema = $db->getTableSchema($tableName);

Expand Down

0 comments on commit 16d7eb1

Please sign in to comment.