Skip to content

Commit f09ea98

Browse files
committed
add accessor for pivot accessor
1 parent 5662243 commit f09ea98

File tree

1 file changed

+10
-0
lines changed

1 file changed

+10
-0
lines changed

src/Illuminate/Database/Eloquent/Relations/BelongsToMany.php

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -952,4 +952,14 @@ public function getRelationName()
952952
{
953953
return $this->relationName;
954954
}
955+
956+
/**
957+
* Get the name of the pivot accessor for this relationship.
958+
*
959+
* @return string
960+
*/
961+
public function getPivotAccessor()
962+
{
963+
return $this->accessor;
964+
}
955965
}

0 commit comments

Comments
 (0)