From 92ec89bf872ee4e4e084625728331b09ceeb20cc Mon Sep 17 00:00:00 2001 From: Ben Claar Date: Fri, 23 Aug 2013 14:47:14 -0500 Subject: [PATCH] Use camel case for model scope generation In L4, scope functions only work with camel case (http://four.laravel.com/docs/eloquent#query-scopes) --- src/Barryvdh/LaravelIdeHelper/ModelsCommand.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Barryvdh/LaravelIdeHelper/ModelsCommand.php b/src/Barryvdh/LaravelIdeHelper/ModelsCommand.php index f046abe..e45965f 100644 --- a/src/Barryvdh/LaravelIdeHelper/ModelsCommand.php +++ b/src/Barryvdh/LaravelIdeHelper/ModelsCommand.php @@ -232,7 +232,7 @@ class ModelsCommand extends Command { } }elseif(\Str::startsWith($method, 'scope') && $method !== 'scopeQuery'){ //Magic setAttribute - $name = \Str::snake(substr($method, 5)); + $name = \Str::camel(substr($method, 5)); if(!empty($name)){ $reflection = new \ReflectionMethod($model, $method); $args = $this->getParameters($reflection);