Call to undefined method Illuminate\Database\Query\Builder::only_full_group_by()
<p>I am working in laravel 5.3. I  have issue to run query.I am trying for groupby query but its not working and error like Call to undefined method Illuminate\Database\Query\Builder::only_full_group_by(). My code like</p>

<pre><code>public function showcart()
{

        $cart = DB::table('cartshow')-&gt;only_full_group_by('pro_id')-&gt;get(); die();

        $i = 1;
        foreach($cart as $tt)
        {

            $count = DB::table('cartlist')-&gt;where('pro_id',$tt-&gt;pro_id)-&gt;sum('qnty');

            $sel_pro= DB::table('product') -&gt; where('id',$tt-&gt;pro_id)-&gt;first();

            $proname = $sel_pro-&gt;name;
            $price = ($sel_pro-&gt;price) * $count;

      echo $cartdata  ="&lt;tr&gt;
                                &lt;td&gt;$proname&lt;br&gt;&lt;small&gt;Swaminarayan, Extra Hot, Cheese&lt;/small&gt;&lt;/td&gt;
                                &lt;td style='vertical-align:middle'&gt;
                                &lt;input type='button' value='-' onclick='qtyminus($tt-&gt;pro_id);' class='qtyminus' field='quantity' /&gt;
                                &lt;input type='text' name='quantity' value='$count' class='qty' id='txt$tt-&gt;pro_id'/&gt;
                                &lt;input type='button' value='+' onclick='qtyplus($tt-&gt;pro_id);' class='qtyplus' field='quantity' /&gt;
                                &lt;/td&gt;
                                &lt;td class='text-right' style='vertical-align:middle'&gt;&lt;button data-id ='$tt-&gt;pro_id' type='button' class='btn btn-xs btn-info'&gt;&lt;i class='fa fa-remove'&gt;&lt;/i&gt;&lt;/button&gt;&lt;/td&gt;
                            &lt;/tr&gt;";

    }   

}   
</code></pre>