title: Api data based on route or by php query
body: <p>I am building a REST API application with Vue.js and Laravel. My question is just a basic best practice since I am new to APIs. Basically I have 2 roles: Supervisor and Manager. Each user will have one or the other and the data is all the same structure, but basically the Manager just will get their accounts and account info while a supervisor will get all Managers accounts and info. </p>
  
  <p>In this situation is it better to have:</p>
  
  <p>A.) A separate API like <code>/api/supervisor/accounts</code> that will return all accounts. The api I use on my ajax will be based on the role:</p>
  
  <pre><code>if(this.$store.state.role == 'supervisor'){
      var url = /api/supervisor/accounts
  } else {
      var url = /api/accounts
  }
  </code></pre>
  
  <p>or </p>
  
  <p>B.) Just hit one route <code>/api/accounts</code> and in the php method return the accounts in JSON based of the users role there.</p>