where('client_id', auth()->guard('contact')->user()->client_id) ->where('is_deleted', 0) ->whereIn('status_id', [Invoice::STATUS_SENT, Invoice::STATUS_PARTIAL, Invoice::STATUS_PAID]) ->sum('amount'); return $this->render('dashboard.index', [ 'total_invoices' => $total_invoices, ]); } }