getNavigationBadge on a managerelatedrecords page

Hello, I have a submenu with some custom ManageRelatedRecords pages. I would like to add a counter badge next to the navigation. The problem im getting is that static::getModel()::count(); cannot be called staticaly. How do I fix this?
4 Replies
Patrick
Patrick10mo ago
static::getModel()->count() ?
Luukd_2000
Luukd_2000OP10mo ago
this is not possible, it returns getModel cannot be called statically
Patrick
Patrick10mo ago
can you share the code
dwiser
dwiser10mo ago
Sharing code would be helpful but I think you'd need either $this->getModel()->count() or (new static)->getModel()->count() depending on where you are and what the context is.
Want results from more Discord servers?
Add your server