My laravel eloquent is like this :
$products = Product::where(\'status\', 1) ->where(\'stock\', \'>\', 0) ->where(\'category
To select only aggregated columns, use the one of the raw methods provided by Laravel. For example:
Product::selectRaw('store_id') ->where('status', 1) ->groupBy('store_id') ->get();