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
static::getModel()->count() ?
this is not possible, it returns getModel cannot be called statically
can you share the code
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.