diff --git a/src/Illuminate/Database/Eloquent/Collection.php b/src/Illuminate/Database/Eloquent/Collection.php index 9701faaa738d..c4e8d9f1778c 100755 --- a/src/Illuminate/Database/Eloquent/Collection.php +++ b/src/Illuminate/Database/Eloquent/Collection.php @@ -566,7 +566,7 @@ public function getQueueableRelations() if (count($relations) === 0 || $relations === [[]]) { return []; } elseif (count($relations) === 1) { - return $relations[0]; + return array_values($relations)[0]; } else { return array_intersect(...$relations); }