I am using the stats section and would like to use a model for a value. I can do this no problem by extending Page, but I need the stats section on the site.xml dashboard. Is this possible i.e to have a model for site?
<?php
// models/home.php
class homePage extends Page
{
public function trees(): string
{
$treeCount = site('home')->children()->listed()->count();
return $treeCount;
}
}