コード例 #1
0
 /**
  * Get the other or associated key for the relationship.
  *
  * @return string
  */
 public function other_key()
 {
     return Relationship::foreign($this->model, $this->other);
 }
コード例 #2
0
ファイル: BelongsTo.php プロジェクト: wallacemaxters/laravel3
 /**
  * Get the properly hydrated results for the relationship.
  *
  * @return Model
  */
 public function results()
 {
     return parent::first();
 }