File tree Expand file tree Collapse file tree 1 file changed +8
-9
lines changed
src/Illuminate/Database/Eloquent Expand file tree Collapse file tree 1 file changed +8
-9
lines changed Original file line number Diff line number Diff line change @@ -665,10 +665,10 @@ public function getQueueableClass()
665
665
return ;
666
666
}
667
667
668
- $ class = $ this ->getModelClass ($ this ->first ());
668
+ $ class = $ this ->getQueueableModelClass ($ this ->first ());
669
669
670
670
$ this ->each (function ($ model ) use ($ class ) {
671
- if ($ this ->getModelClass ($ model ) !== $ class ) {
671
+ if ($ this ->getQueueableModelClass ($ model ) !== $ class ) {
672
672
throw new LogicException ('Queueing collections with multiple model types is not supported. ' );
673
673
}
674
674
});
@@ -677,17 +677,16 @@ public function getQueueableClass()
677
677
}
678
678
679
679
/**
680
- * Get the identifiers for a single entity .
680
+ * Get the queueable class name for the given model .
681
681
*
682
+ * @param \Illuminate\Database\Eloquent\Model $model
682
683
* @return string
683
684
*/
684
- protected function getModelClass ($ model )
685
+ protected function getQueueableModelClass ($ model )
685
686
{
686
- if (method_exists ($ model , 'getClassNameForSerialization ' )) {
687
- return $ model ->getClassNameForSerialization ();
688
- }
689
-
690
- return get_class ($ model );
687
+ return method_exists ($ model , 'getQueueableClassName ' )
688
+ ? $ model ->getQueueableClassName ()
689
+ : get_class ($ model );
691
690
}
692
691
693
692
/**
You can’t perform that action at this time.
0 commit comments