Skip to content

Commit

Permalink
access pivot on resource
Browse files Browse the repository at this point in the history
  • Loading branch information
taylorotwell committed Sep 29, 2017
1 parent 3bf8632 commit 1f37ccc
Showing 1 changed file with 3 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -139,7 +139,9 @@ protected function whenPivotLoaded($table, $value, $default = null)
}

return $this->when(
$this->pivot && ($this->pivot instanceof $table || $this->pivot->getTable() === $table),
$this->resource->pivot &&
($this->resource->pivot instanceof $table ||
$this->resource->pivot->getTable() === $table),
...[$value, $default]
);
}
Expand Down

0 comments on commit 1f37ccc

Please sign in to comment.