From 7a698069671dfd08b589a4f195d42fea663df3d9 Mon Sep 17 00:00:00 2001 From: Ryan Hayle Date: Wed, 5 Oct 2016 17:31:20 -0500 Subject: [PATCH] Add sitemap service alias to provides method to prevent BindingResolutionException Because the service provider is deferred, we need to tell the application that it provides the Sitemap class in order to inject it properly. --- src/Roumen/Sitemap/SitemapServiceProvider.php | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/Roumen/Sitemap/SitemapServiceProvider.php b/src/Roumen/Sitemap/SitemapServiceProvider.php index 46de86c..aa1ccbf 100644 --- a/src/Roumen/Sitemap/SitemapServiceProvider.php +++ b/src/Roumen/Sitemap/SitemapServiceProvider.php @@ -1,6 +1,7 @@ app->alias('sitemap','Roumen\Sitemap\Sitemap'); + $this->app->alias('sitemap', Sitemap::class); } /** @@ -61,6 +62,6 @@ public function register() */ public function provides() { - return ['sitemap']; + return ['sitemap', Sitemap::class]; } }