Search snippets
Browse Code Answers
FAQ
Usage docs
Log In
Sign Up
Home
Whatever
sum two columns in eloquent
Martin
Programming language:
Whatever
2021-07-01 19:10:31
0
Q:
sum two columns in eloquent
CScienceSince2015
Code:
Whatever
2021-06-21 16:24:13
\App\Models\YourModel::sum(DB::raw('field1 + field2'));
2
Tags
sum
columns
two
two columns
Related
eloquent get only some columns
r sum based on two columns
how to add the sum of multiple columns into another column in a dataframe
sum of multiple columns in postgres
New to Communities?
Join the community