title: Up vote and down vote in Laravel eloquent
body: <p>I want to create an up vote and down vote system for my website where a unique user can vote up/down for one post and next time he only allow to opposite to get off from database and after that he again can up or down vote.</p>
  
  <p>In this case I have:</p>
  
  <p>users table :</p>
  
  <pre><code>id 
  name
  </code></pre>
  
  <p>debates table :</p>
  
  <pre><code>id
  post
  </code></pre>
  
  <p>upvotes table:</p>
  
  <pre><code>id
  user_id
  debate_id
  </code></pre>
  
  <p>and similarly downvote table:</p>
  
  <pre><code>id
  user_id
  debate_id
  </code></pre>
  
  <p>Is that a good way to manage and track up vote and down vote concept?</p>