title: Laravel: using "morphMany" and joining another table?
body: <p>I'm new to laravel too. I have a question about Eloquent:</p>
  
  <p><strong>table structures:</strong></p>
  
  <pre><code>User: id, username
  
  Posts: id, user_id, content
  
  Likes: id, likeable_type, likeable_id, user_id
  </code></pre>
  
  <p>(Because of I want to make 'Likes' table extendable for comments, too.)</p>
  
  <p><strong>Models\Likes.php</strong></p>
  
  <pre><code>class Likes extends Model
  
  public function likeable()
  {
      return $this-&gt;morphTo();
  }
  </code></pre>
  
  <p><strong>Models\Post.php</strong></p>
  
  <pre><code>class Posts extends Model
  
  public function likes()
  {
      return $this-&gt;morphMany("\App\Models\Likes","likeable");
  }
  </code></pre>
  
  <p>And when I call </p>
  
  <pre><code>$post = Posts::find($id)-&gt;likes()-&gt;get();
  </code></pre>
  
  <p>in my controllers, it will return like this:</p>
  
  <pre><code>"likes": [
  {
    "id": 1,
    "likeable_type": "App\\Models\\Posts",
    "likeable_id": 1,
    "user_id": 1,
  },
  {
    "id": 2,
    "likeable_type": "App\\Models\\Posts",
    "likeable_id": 1,
    "user_id": 1,
  }]
  </code></pre>
  
  <p>But how can I get results like this:</p>
  
  <pre><code>"likes": [
  {
    "id": 1,
    "likeable_type": "App\\Models\\Posts",
    "likeable_id": 1,
    "user_id": 1,
    "username":"chenhui",//join user on user.id = likes.user_id
  }...
  </code></pre>
  
  <p>Many thanks and sorry for my poor english!</p>