title: Laravel - Best strategy to model tables relations
body: <p>I have the following issue.</p>
  
  <p>I am trying to find out what is the best way to organize a relationship beetwen Users-Roles-Stores-Schools.</p>
  
  <p>A User can have multiple Roles attached to a Store or to a School, so one can create the realtion :</p>
  
  <p>"User [testuser@email.com] is [root] for school [HighSchool1]"</p>
  
  <p>and also</p>
  
  <p>"User [testuser@email.com] is [user] for store [Store1]"</p>
  
  <p>So a user can have multiple roles, but that roles is attached to a School OR a Store</p>
  
  <p>at begining I was about to do this ...</p>
  
  <p>```
      User
      -id
      -name
      -email
      -password</p>
  
  <pre><code>Roles
  -id
  -name
  
  Roles_user
  -id
  -rol_id
  -user_id
  -school_id           //whatch this
  -store_id             //whatch this
  
  School
  -id
  -name
  
  Store
  -id
  -name
  </code></pre>
  
  <p>The problem is, that in the future, the  system could also handle supermarkets ... and I would have change my roles_user table to attach new columns for that.</p>
  
  <p>How can I achieve this .... using of corse Eloquent and Relationships?</p>