Use camel case for model scope generation

In L4, scope functions only work with camel case (http://four.laravel.com/docs/eloquent#query-scopes)
This commit is contained in:
Ben Claar
2013-08-23 14:47:14 -05:00
parent afeaf2f28b
commit 92ec89bf87
@@ -232,7 +232,7 @@ class ModelsCommand extends Command {
} }
}elseif(\Str::startsWith($method, 'scope') && $method !== 'scopeQuery'){ }elseif(\Str::startsWith($method, 'scope') && $method !== 'scopeQuery'){
//Magic set<name>Attribute //Magic set<name>Attribute
$name = \Str::snake(substr($method, 5)); $name = \Str::camel(substr($method, 5));
if(!empty($name)){ if(!empty($name)){
$reflection = new \ReflectionMethod($model, $method); $reflection = new \ReflectionMethod($model, $method);
$args = $this->getParameters($reflection); $args = $this->getParameters($reflection);