I have these tables:
Orders: id - status -user_id - address_id 1 await 1 1 products: id - name - price - quantity 1 test1 100$
Find the sum of a field by using laravel collection by doing something like this;
$profuctTotal=Product::all()->sum('price'); Do same for others using Eloquent models.