php laravel codes to calculae sum of two columns code example Example: sum two columns in eloquent \App\Models\YourModel::sum(DB::raw('field1 + field2'));