5 months ago

How do I calculate the sum of a column and display it in a view?

Posted 5 months ago by Patrickoli

Hello, unfortunately I couldn't find anything suitable in the forum so far.

I use laravel auth and have a user to budget relation. For the logged in user all single budget entries in the view are displayed in a table using @foreach. How can I calculate the sum of all entries from the column with the values of the logged in user and display it in the view? I have a budget model and a budget controller. Where do I have to enter what?

If you need the source code, I can deliver it later.

Greetings from germany Patrickoli

Translated with

Please sign in or create an account to participate in this conversation.