diff --git a/src/Console/ModelsCommand.php b/src/Console/ModelsCommand.php index ad575ca..c6ace3d 100644 --- a/src/Console/ModelsCommand.php +++ b/src/Console/ModelsCommand.php @@ -476,6 +476,11 @@ class ModelsCommand extends Command $search = '$this->' . $relation . '('; if ($pos = stripos($code, $search)) { //Resolve the relation's model to a Relation object. + $methodReflection = new \ReflectionMethod($model, $method); + if ($methodReflection->getNumberOfParameters()) { + return; + } + $relationObj = $model->$method(); if ($relationObj instanceof Relation) {