how to sum column in query builder laravel code example Example: laravel eloquent sum column Product::where('id',$id)->sum('quantity');