title: Return object using with() in Laravel Eloquent
body: <p>Currently I get data like so:</p>
  
  <pre><code>-&gt;with(['posts' =&gt; function ($query) {
              $query-&gt;active()-&gt;available()-&gt;limit(1)-&gt;with('user');
              }])
  </code></pre>
  
  <p>and it returns the user data as an array of objects which is expected. Because I am using a limit and will only ever need one result, I'd like to return it as a regular object, so instead of:</p>
  
  <pre><code>"data": value,
  "posts": [
      {
        "data": value,
        "user": {
          "data": value
        }
      }
    ]
  </code></pre>
  
  <p>I'd like to return it as:</p>
  
  <pre><code>"data": value,
  "post":
          {
            "data": value,
            "user": {
              "data": value
            }
          }
  </code></pre>
  
  <p>What's the best way to go about it?</p>