diff --git a/src/ServiceProvider.php b/src/ServiceProvider.php index 7ca87cda..5174f742 100644 --- a/src/ServiceProvider.php +++ b/src/ServiceProvider.php @@ -18,6 +18,7 @@ use Statamic\Facades\Site; use Statamic\Facades\User; use Statamic\Providers\AddonServiceProvider; +use Statamic\SeoPro\Commands\GenerateReportCommand; use Statamic\SeoPro\Commands\PurgeErrorsCommand; use Statamic\SeoPro\Events\RedirectSaved; use Statamic\SeoPro\GraphQL\AlternateLocaleType; @@ -58,6 +59,10 @@ class ServiceProvider extends AddonServiceProvider public function register() { + // Statamic discovers commands automatically, but only when running in the console. + // To call this in a web request, we need to register it manually. + $this->commands([GenerateReportCommand::class]); + $this->registerSerializableClasses([ Error::class, Page::class,