Merge pull request #190 from MalikinSergey/patch-1

Add Query\Builder return type to magic scope* methods
This commit is contained in:
Barry vd. Heuvel
2015-05-06 12:08:42 +02:00
+1 -1
View File
@@ -310,7 +310,7 @@ class ModelsCommand extends Command
$args = $this->getParameters($reflection); $args = $this->getParameters($reflection);
//Remove the first ($query) argument //Remove the first ($query) argument
array_shift($args); array_shift($args);
$this->setMethod($name, '\\' . $reflection->class, $args); $this->setMethod($name, '\Illuminate\Database\Query\Builder|\\' . $reflection->class, $args);
} }
} elseif (!method_exists('Eloquent', $method) && !Str::startsWith($method, 'get')) { } elseif (!method_exists('Eloquent', $method) && !Str::startsWith($method, 'get')) {