Skip to content

Commit

Permalink
Fix model:prune error with non-class php files (laravel#48708)
Browse files Browse the repository at this point in the history
  • Loading branch information
zlodes authored and timacdonald committed Oct 24, 2023
1 parent d0d58f1 commit f9df7ab
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/Illuminate/Database/Console/PruneCommand.php
Original file line number Diff line number Diff line change
Expand Up @@ -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();
}

Expand Down

0 comments on commit f9df7ab

Please sign in to comment.