michael1986
1 year ago
1323
5
Nova

Make a relation count field sortable in Nova

Posted 1 year ago by michael1986

Hi all,

I'd like to know if it's possible to make a relation count field sortable in Nova.

Number::make(__('Categories'), function () {
    return $this->categories->count();
}),

Obviously adding ->sortable() doesn't work here.

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