Skip to content

Commit

Permalink
facade to clear resolve instance to avoid duplication
Browse files Browse the repository at this point in the history
  • Loading branch information
akki-io committed Feb 16, 2022
1 parent 6729ed8 commit 677f721
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 6 deletions.
4 changes: 3 additions & 1 deletion src/Facades/LaravelGoogleAnalytics.php
Original file line number Diff line number Diff line change
Expand Up @@ -77,6 +77,8 @@ class LaravelGoogleAnalytics extends Facade
*/
protected static function getFacadeAccessor(): string
{
return 'laravel-google-analytics';
self::clearResolvedInstance(\AkkiIo\LaravelGoogleAnalytics\LaravelGoogleAnalytics::class);

return \AkkiIo\LaravelGoogleAnalytics\LaravelGoogleAnalytics::class;
}
}
5 changes: 0 additions & 5 deletions src/LaravelGoogleAnalyticsServiceProvider.php
Original file line number Diff line number Diff line change
Expand Up @@ -25,10 +25,5 @@ public function register()
{
// Automatically apply the package configuration
$this->mergeConfigFrom(__DIR__.'/../config/config.php', 'laravel-google-analytics');

// Register the main class to use with the facade
$this->app->singleton('laravel-google-analytics', function () {
return new LaravelGoogleAnalytics;
});
}
}

0 comments on commit 677f721

Please sign in to comment.