diff --git a/src/Console/InstallCommand.php b/src/Console/InstallCommand.php index 44d78f0..4cf1d17 100644 --- a/src/Console/InstallCommand.php +++ b/src/Console/InstallCommand.php @@ -33,6 +33,11 @@ protected function registerServiceProvider(): void { $namespace = Str::replaceLast('\\', '', $this->getLaravel()->getNamespace()); + if (file_exists($this->getLaravel()->bootstrapPath('providers.php'))) { + // @phpstan-ignore-next-line + return ServiceProvider::addProviderToBootstrapFile("{$namespace}\\Providers\\MetaTagsServiceProvider"); + } + /** @psalm-suppress UndefinedFunction */ $config = file_get_contents(config_path('app.php')); $line = $namespace . '\Providers\MetaTagsServiceProvider::class';