diff --git a/src/Barryvdh/LaravelIdeHelper/GeneratorCommand.php b/src/Barryvdh/LaravelIdeHelper/GeneratorCommand.php index 6bbab52..83f19f7 100755 --- a/src/Barryvdh/LaravelIdeHelper/GeneratorCommand.php +++ b/src/Barryvdh/LaravelIdeHelper/GeneratorCommand.php @@ -195,7 +195,8 @@ namespace {\n\tdie('Only to be used as an helper for your IDE');\n}\n\n"; { if(!in_array($method->name, $usedMethods)){ $static = !in_array($method->name, $nonstaticMethods); - $output .= $this->parseMethod($method, $alias, $root, $static); + $declaringClass = $method->getDeclaringClass(); + $output .= $this->parseMethod($method, $alias, $declaringClass->name, $static); $usedMethods[] = $method->name; } }