diff --git a/Eloquent/Collection.php b/Eloquent/Collection.php
index <HASH>..<HASH> 100755
--- a/Eloquent/Collection.php
+++ b/Eloquent/Collection.php
@@ -6,7 +6,7 @@ use LogicException;
 use Illuminate\Support\Arr;
 use Illuminate\Support\Str;
 use Illuminate\Contracts\Support\Arrayable;
-use Illuminate\Database\Eloquent\Relations\Pivot;
+use Illuminate\Contracts\Queue\QueueableEntity;
 use Illuminate\Contracts\Queue\QueueableCollection;
 use Illuminate\Support\Collection as BaseCollection;
 
@@ -541,7 +541,7 @@ class Collection extends BaseCollection implements QueueableCollection
             return [];
         }
 
-        return $this->first() instanceof Pivot
+        return $this->first() instanceof QueueableEntity
                     ? $this->map->getQueueableId()->all()
                     : $this->modelKeys();
     }
Fix QueueableCollection relying on Pivot->getQueueableId() instead of QueueableEntity->getQueueableId()

Found this issue during development where we have a model that uses binary UUIDs.
While the single model serialization works fine, the collection serialization +
JSON encoding breaks.