title: Access collection instance as javascript variable?
body: <p>I was trying to send collection of following Query:</p>
  
  <pre><code> $monthly_report_chart = DB::table("transactions")
          -&gt;select(DB::raw("Date(updated_at) as today"),DB::raw("SUM(collected_today) as sum"))
          -&gt;groupBy(DB::raw('Date(updated_at)'))
          -&gt;where(DB::raw('Month(updated_at)'),'=',$month)
          -&gt;get();
  </code></pre>
  
  <p>And i want to access the collection in javascript like this :</p>
  
  <pre><code>{!! json_encode($monthly_report_chart-&gt;today) !!}
  </code></pre>
  
  <p>But it throws following Error :</p>
  
  <blockquote>
    <p>Property [today] does not exist on this collection instance</p>
  </blockquote>
  
  <p>How do access collection instance in javascript? 
  Thanks!</p>