Highchart, SQL and Laravel
<p>I have got the high chart to work on a page in Laravel 5.2.</p>

<p>I can successfully pull data from the SQL database</p>

<pre><code>&lt;?php $sales = DB::table('SalesData')
    -&gt;select('Amount')
    -&gt;where('SalesYear','2016')
    -&gt;groupby('MonthShortName')
    -&gt;get()
?&gt;
</code></pre>

<p>Question is two fold.</p>

<p><strong>1. How do I get that variable in the highchart</strong></p>

<pre><code>            name: 'Sales',
            type: 'column',
            yAxis: 2,
            data: [&lt;?php $sales?&gt;],
            marker: {
                enabled: false
            },
            dashStyle: 'shortdot',
            tooltip: {
                valueSuffix: ' R\'s'
            }
</code></pre>

<p><strong>2. How do I select the column AMOUNT from the sql table and SUM the amount at the same time as per the query above.</strong></p>