title: Simulate second login and query through relations off that
body: <p>What ways are there to simulate another login without password (1 user, some playable characters).</p>
  
  <p>It worked when a User created the Team. But it does make more sense that a Character creates/joins a Team. Since a User hasMany Characters, I'm completly screwed. How do I know which of all the Characters creates/joins a Team? It was easy with only 1 User doing this.</p>
  
  <p>Probably missing some general programming skills, but I'm learning!</p>
  
  <p><strong>Relations</strong><br>
  User hasMany Characters &lt;> Character belongsTo User<br>
  Character belongsTo Team &lt;> Team hasMany Characters</p>
  
  <p><strong>URL</strong><br>
  In team.index I really don't get how to collect all Characters of a Team. The 
  url is currently just <code>/team</code>. Do I have to use something like <code>/{character}/{team}</code>? But I like the simplicity of just <code>/team</code>.</p>
  
  <p><strong>Code</strong><br>
  I came up with variants of the following, but if feels wrong. And is wrong :-D</p>
  
  <pre><code>// how would the app know which of the Characters.Team we need. App and me don't know...
  $team = auth()-&gt;user()-&gt;characters()-&gt;team()-&gt;first();
  $characters = \App\Character::where('team_id', $team-&gt;id)-&gt;get();
  </code></pre>
  
  <p>Clarify this for me, please!</p>
  
  <p>Are the relations wrong?<br>
  Is my approach wrong?<br>
  Am I missing easy Laravel magic?</p>
  
  <p>Thank you.</p>