diff --git a/src/Illuminate/Database/Eloquent/Collection.php b/src/Illuminate/Database/Eloquent/Collection.php index 261902703c5d..4114d8afe3d6 100755 --- a/src/Illuminate/Database/Eloquent/Collection.php +++ b/src/Illuminate/Database/Eloquent/Collection.php @@ -135,6 +135,7 @@ protected function loadMissingRelation(Collection $models, array $path) public function loadMorph($relation, $relations) { $this->pluck($relation) + ->filter() ->groupBy(function ($model) { return get_class($model); })