Access foreign property in Belongs_To through a getter

This commit is contained in:
Pavel Puchkin
2013-05-08 11:39:51 +11:00
parent cffded660c
commit 641ac8d69c

View File

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