Commit 16d7eb14 authored by Tobias Munk's avatar Tobias Munk Committed by GitHub

Merge pull request #184 from StalkAlex/patch-1

Apply cutom model name in UI giiant
parents d842bfad f57d4050
......@@ -246,7 +246,10 @@ class Generator extends \yii\gii\generators\model\Generator
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);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment