Add extend \Eloquent for ide-helper:models command

It's help author to close many issues! )
Like: #269, #259, #248, #209, #191, #74, 
and https://github.com/laravel/framework/issues/7558 )))
etc. maybe
This commit is contained in:
Sergius
2016-01-12 15:33:05 +02:00
parent da05897cb7
commit 4069863d0c
+5 -1
View File
@@ -484,6 +484,10 @@ class ModelsCommand extends Command
$phpdoc->appendTag($tag);
}
if ($this->write) {
$phpdoc->appendTag(Tag::createInstance("@mixin \\Eloquent", $phpdoc));
}
$serializer = new DocBlockSerializer();
$serializer->getDocComment($phpdoc);
$docComment = $serializer->getDocComment($phpdoc);
@@ -507,7 +511,7 @@ class ModelsCommand extends Command
}
}
$output = "namespace {$namespace}{\n{$docComment}\n\tclass {$classname} {}\n}\n\n";
$output = "namespace {$namespace}{\n{$docComment}\n\tclass {$classname} extends \Eloquent {}\n}\n\n";
return $output;
}