From 43086d3868fcee98deccdb738125322c695f0a65 Mon Sep 17 00:00:00 2001 From: Jose Erick Carreon Date: Mon, 1 Apr 2024 04:17:17 -0600 Subject: [PATCH] Fixed register service provider for L11 --- src/Console/InstallCommand.php | 5 +++++ 1 file changed, 5 insertions(+) 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';