muzafferdede
6 months ago
679
2
Nova

How to group relation column in Nova Metrics

Posted 6 months ago by muzafferdede

hi, i am trying to group Partition metrics by relation but i am not sure how to select relation table column name, what i am trying to do is:


    public function calculate(NovaRequest $request)
    {
        return $this->count($request, SaleItem::where('salable_type', Product::class), 'salable.name', 'quantity');
    }

i got error unknow salable.name colmun name error.

What is the correct way to do so?

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