title: When to use pivot tables in Laravel
body: <p>I have a one-to-many relationship for <code>Gym</code> to <code>User</code> relationship. That being a <code>Gym</code> can have multiple users, but a <code>User</code> can only have one gym. </p>
  
  <p>Is it better to have a pivot table for this to link <code>gym_id</code> to <code>user_id</code> like follows?</p>
  
  <p><code>Gym_User</code> Table:</p>
  
  <pre><code>gym_id  |  user_id
  </code></pre>
  
  <p>or in the <code>User</code> table like follows?</p>
  
  <p><code>User</code> Table:</p>
  
  <pre><code>id | name | password | gym_id 
  </code></pre>