diff --git a/src/Console/ModelsCommand.php b/src/Console/ModelsCommand.php index d2d484ff5..113816ad7 100644 --- a/src/Console/ModelsCommand.php +++ b/src/Console/ModelsCommand.php @@ -932,7 +932,13 @@ protected function createPhpDocs($class) continue; } $arguments = implode(', ', $method['arguments']); - $tagLine = "@method static {$method['type']} {$name}({$arguments})"; + + if (method_exists(\Illuminate\Database\Eloquent\Model::class, $name)) { + $tagLine = "@method static {$method['type']} {$name}({$arguments})"; + } else { + $tagLine = "@method {$method['type']} {$name}({$arguments})"; + } + if ($method['comment'] !== '') { $tagLine .= " {$method['comment']}"; }