Skip to content

Commit

Permalink
add accessor for pivot accessor
Browse files Browse the repository at this point in the history
  • Loading branch information
taylorotwell committed Dec 1, 2017
1 parent 5662243 commit f09ea98
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions src/Illuminate/Database/Eloquent/Relations/BelongsToMany.php
Original file line number Diff line number Diff line change
Expand Up @@ -952,4 +952,14 @@ public function getRelationName()
{
return $this->relationName;
}

/**
* Get the name of the pivot accessor for this relationship.
*
* @return string
*/
public function getPivotAccessor()
{
return $this->accessor;
}
}

0 comments on commit f09ea98

Please sign in to comment.