title: Adding new property to Eloquent Collection
body: <p>Trying to add new property to existing collection and access that.</p>
  
  <p>What I need is something like:</p>
  
  <pre><code>$text = Text::find(1);  //Text model has properties- id,title,body,timestamps
  $text-&gt;user = $user;
  </code></pre>
  
  <p>And access the user via, <code>$text-&gt;user</code>. </p>
  
  <p>Exploring on documentation and SO, I found <code>put</code>, <code>prepend</code>, <code>setAttribute</code> methods to do that.</p>
  
  <pre><code>$collection = collect();
  $collection-&gt;put('a',1);
  $collection-&gt;put('c',2);
  echo $collection-&gt;c; //Error: Undefined property: Illuminate\Support\Collection::$c
  </code></pre>
  
  <p>Again, </p>
  
  <pre><code>$collection = collect();
  $collection-&gt;prepend(1,'t');
  echo $collection-&gt;t = 5; //Error: Undefined property: Illuminate\Support\Collection::$t
  </code></pre>
  
  <p>And </p>
  
  <pre><code>$collection = collect();
  $collection-&gt;setAttribute('c',99); // Error: undefined method setAttribute
  echo $collection-&gt;c;
  </code></pre>
  
  <p>Any help? </p>