Class '...SiteModuleService' not found when used inside scout.php
Worked when I added a use-statement to the top of scout.php:
&lt;?php
use modules\sitemodule\services\SitemoduleService as SitemoduleService;

And then:
'indices'       =&gt; (new SitemoduleService)-&gt;getIndicies()