N
N
ninja op op2020-05-08 12:30:07
Laravel
ninja op op, 2020-05-08 12:30:07

How to add all column values ​​to each other via Eloquent Model Laravel?

In a normal SQL query, I used I don't know how this can be implemented through the Eloquent Model? Can anyone advise?
SELECT SUM(`столбец`) FROM `table_name`

Answer the question

In order to leave comments, you need to log in

1 answer(s)
A
Alexey Ukolov, 2020-05-08
@kur4chyt

->table('name')->sum('column')

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question