Commit f57d4050 authored by Alexander's avatar Alexander Committed by GitHub

Apply cutom model name in UI giiant

https://github.com/schmunk42/yii2-giiant/issues/176
parent d842bfad
......@@ -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