title: Laravel 5 - Return Full Object From Model Relationship Query
body: <p>I have a model that looks like:</p>
  
  <pre><code>class User extends Model{
  
      public function projects(){
  
          $this-&gt;hasMany('Project', 'project_id')
  
     }
  
  }
  </code></pre>
  
  <p>When I use the above method by calling <code>$user-&gt;projects()-&gt;get()</code> after initializing the class, I get a collection of only info related to the project(s):</p>
  
  <pre><code>Object [attributes:protected] =&gt; array(
       [project_name] =&gt; 'my project',
       [project_description] =&gt; 'my other project',
       [created_at] =&gt; '11-22-2015 04:23:12'
  )
  </code></pre>
  
  <p>How do I get a collection that has data for both the project(s) and the user?  I am looking for something like:</p>
  
  <pre><code>Object [attributes:protected] =&gt; array(
       [user_name] =&gt; 'macdadd',
       [user_type] =&gt; 4,
       [created_at] =&gt; '11-22-2015 04:23:12',
       [project] =&gt; array(
           array(
               [project_name] =&gt; 'my project',
               [project_description] =&gt; 'my other project',
               [created_at] =&gt; '11-22-2015 04:23:12'
           )
       )
  )
  </code></pre>