From 75a9923e4015d021926ebe8c40f725402eba6448 Mon Sep 17 00:00:00 2001 From: freek Date: Thu, 8 Oct 2015 20:07:29 +0200 Subject: [PATCH] fix serviceprovider --- CHANGELOG.md | 3 +++ src/LaravelAnalyticsServiceProvider.php | 4 +++- 2 files changed, 6 insertions(+), 1 deletion(-) 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'); } /**