diff --git a/src/Console/ModelsCommand.php b/src/Console/ModelsCommand.php index 83e8836..abcdbf2 100644 --- a/src/Console/ModelsCommand.php +++ b/src/Console/ModelsCommand.php @@ -383,7 +383,7 @@ class ModelsCommand extends Command if ($this->write_model_magic_where) { $this->setMethod( Str::camel("where_" . $name), - '\Illuminate\Database\Query\Builder|\\' . get_class($model), + '\Illuminate\Database\Eloquent\Builder|\\' . get_class($model), array('$value') ); } @@ -430,7 +430,7 @@ class ModelsCommand extends Command $args = $this->getParameters($reflection); //Remove the first ($query) argument array_shift($args); - $this->setMethod($name, '\Illuminate\Database\Query\Builder|\\' . $reflection->class, $args); + $this->setMethod($name, '\Illuminate\Database\Eloquent\Builder|\\' . $reflection->class, $args); } } elseif (!method_exists('Illuminate\Database\Eloquent\Model', $method) && !Str::startsWith($method, 'get')