Skip to content

Commit

Permalink
Fix wakeup for pivot relationships
Browse files Browse the repository at this point in the history
  • Loading branch information
erikgaal committed Jan 30, 2019
1 parent 1d7fafc commit 88a1600
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions src/Illuminate/Database/Eloquent/Model.php
Original file line number Diff line number Diff line change
Expand Up @@ -1408,10 +1408,12 @@ public function getQueueableRelations()
$relations = [];

foreach ($this->getRelations() as $key => $relation) {
if (method_exists($this, $key)) {
$relations[] = $key;
if (! method_exists($this, $key)) {
continue;
}

$relations[] = $key;

if ($relation instanceof QueueableCollection) {
foreach ($relation->getQueueableRelations() as $collectionValue) {
$relations[] = $key.'.'.$collectionValue;
Expand Down

0 comments on commit 88a1600

Please sign in to comment.