laravel eloquent get sum of columns code example Example: laravel eloquent sum column Product::where('id',$id)->sum('quantity');