Be part of JetBrains PHPverse 2026 on June 9 – a free online event bringing PHP devs worldwide together.

gdavid's avatar

Laravel nova metrics calculate net Revenu

I have a table of invoices, each invoice includes two columns :

Revenue (before discount) and discount

I want to display the "net revenue" over time at the metrics

How do i add the discount value to this:

  public function calculate(Request $request)

 {
     return $this->sum($request, t_hen::where('hen_type', '1'),'revenue','hen_date');

 }
0 likes
0 replies

Please or to participate in this conversation.