diff --git a/src/Illuminate/Database/Console/PruneCommand.php b/src/Illuminate/Database/Console/PruneCommand.php index 5144247eeff0..0c51beb345b2 100644 --- a/src/Illuminate/Database/Console/PruneCommand.php +++ b/src/Illuminate/Database/Console/PruneCommand.php @@ -138,10 +138,10 @@ protected function models() return $models->reject(function ($model) use ($except) { return in_array($model, $except); }); - })->filter(function ($model) { - return $this->isPrunable($model); })->filter(function ($model) { return class_exists($model); + })->filter(function ($model) { + return $this->isPrunable($model); })->values(); }