title: Eloquent: How to define a one-to-one relationship on the same model
body: <p>Say I have a Tennis players model, and each player has a mate they're tied to for doubles games. How would I define that relationship in Eloquent? I'm used to the usual scenario in the docs (and have seen the same in many codebases) where the one-to-one relationship points to an entry in another table which makes it straight-forward where to put <code>hasOne()</code> and <code>belongsTo()</code>.</p>
  
  <p>A player can only have one mate plus no two players share the same mate, and their relationship is determined by the value in a <code>mate_id</code> field. So ideally I'd want to do <code>$player-&gt;mate</code> to get the mate.</p>
  
  <p>So what goes in the <code>mate()</code> method that I'll add on the Player model, to satisfy the requirement of a <code>hasOne()</code> and <code>belongsTo()</code> as <a href="https://laravel.com/docs/5.2/eloquent-relationships#one-to-one" rel="nofollow">shown in the docs</a>? Thanks</p>