From f1ebd847aac9a4545325d35108cafc285fe1605f Mon Sep 17 00:00:00 2001 From: "Barry vd. Heuvel" Date: Thu, 3 Mar 2016 09:45:00 +0100 Subject: [PATCH] Check on actual model, not facade Fixes #311 --- src/Console/ModelsCommand.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Console/ModelsCommand.php b/src/Console/ModelsCommand.php index 607e448..b14e4f1 100644 --- a/src/Console/ModelsCommand.php +++ b/src/Console/ModelsCommand.php @@ -334,7 +334,7 @@ class ModelsCommand extends Command array_shift($args); $this->setMethod($name, '\Illuminate\Database\Query\Builder|\\' . $reflection->class, $args); } - } elseif (!method_exists('Eloquent', $method) && !Str::startsWith($method, 'get')) { + } elseif (!method_exists('Illuminate\Database\Eloquent\Model', $method) && !Str::startsWith($method, 'get')) { //Use reflection to inspect the code, based on Illuminate/Support/SerializableClosure.php $reflection = new \ReflectionMethod($model, $method);