You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
In my use case I need metrics on a user basis, but there is no way to pass anything to the aggregate function of the metrics classes. I'm currently extending the respective classes myself and overwriting the aggregate function. But perhaps it would simply be solvable to offer an opportunity to hand something over here.
Example of what I added to my custom aggregate in the Laravel\Nova\Metrics\Value class:
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
In my use case I need metrics on a user basis, but there is no way to pass anything to the aggregate function of the metrics classes. I'm currently extending the respective classes myself and overwriting the aggregate function. But perhaps it would simply be solvable to offer an opportunity to hand something over here.
Example of what I added to my custom aggregate in the Laravel\Nova\Metrics\Value class:
$userCustomers = $request->user()->customers()->get()->pluck('id')->toArray(); $query->whereIn('customer_id', $userCustomers);
In addition, the getDefaultTimezone method should not be set private to use it also in extended classes.
Beta Was this translation helpful? Give feedback.
All reactions