title: How to insert element in Laravel collection after an element with a specified key?
body: <p>I'm looking to insert an element into a Laravel collection right after another element with a specific key. Something like:</p>
  
  <p><code>$collection-&gt;get(5)-&gt;insertAfter($someElement)</code></p>
  
  <p>The order is important because I will be using it to output HTML later in the view. I looked through the API and couldn't find a suitable method. What I'm doing is basically a comments system, and I'm trying to add the comments that are in reply to other comments right after.</p>
  
  <p>Is this doable? I'm using Laravel 4.2. I also am considering doing a lot of splices and merging but that seems like it would be really terrible performance-wise. </p>
  
  <p>Any suggestions? Thanks.</p>