Merge pull request #1974 from neoascetic/belongs_to_call_a_getter

Access foreign property in Belongs_To through a getter
This commit is contained in:
Taylor Otwell
2013-05-13 22:49:36 -07:00

View File

@@ -110,7 +110,7 @@ class Belongs_To extends Relationship {
*/
public function foreign_value()
{
return $this->base->get_attribute($this->foreign);
return $this->base->{$this->foreign};
}
/**