diff --git a/CHANGELOG.md b/CHANGELOG.md index a383665..00834f3 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,6 +2,9 @@ All Notable changes to Laravel-Analytics will be documented in this file +## 1.2.2 +- An injected `Spatie\Analytics`-object will now be properly configured + ## 1.2.1 - Removed a var_dump-call that was not supposed to be there diff --git a/src/LaravelAnalyticsServiceProvider.php b/src/LaravelAnalyticsServiceProvider.php index 2382f43..c337f38 100644 --- a/src/LaravelAnalyticsServiceProvider.php +++ b/src/LaravelAnalyticsServiceProvider.php @@ -21,7 +21,7 @@ public function boot() */ public function register() { - $this->app->bind('laravelAnalytics', function ($app) { + $this->app->bind(LaravelAnalytics::class, function ($app) { $googleApiHelper = $this->getGoogleApiHelperClient(); @@ -29,6 +29,8 @@ public function register() return $laravelAnalytics; }); + + $this->app->alias(LaravelAnalytics::class, 'laravelAnalytics'); } /**