Need to show sum of a column (amount) from a table (transactions) except count #52
Closed
shovann-notebrains
started this conversation in
Ideas
Replies: 4 comments
-
|
This isn't currently possible, sorry. The query is counting the number of records so a sum won't work. |
Beta Was this translation helpful? Give feedback.
0 replies
-
|
Thanks for your reply. |
Beta Was this translation helpful? Give feedback.
0 replies
-
|
I won't rule it out, but it's not really the point of the plugin. But sounds more like a custom widget use case. |
Beta Was this translation helpful? Give feedback.
0 replies
-
|
Ok, thank you |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
For my TransactionResource except row count I want to show sum of collected amount.
Is this feature can be done in this plugin ?
public static function getOverlookWidgetQuery(Builder $query): Builder
{
return $query->where('host_id', '=', auth()->user()->id)->sum('amount');
}
Beta Was this translation helpful? Give feedback.
All reactions