Skip to content

Commit

Permalink
Merge pull request #10 from akki-io/fix/design-oversight-fix
Browse files Browse the repository at this point in the history
facade to clear resolve instance to avoid duplication
  • Loading branch information
akki-io authored Feb 16, 2022
2 parents 6729ed8 + 677f721 commit 514fd7b
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 514fd7b

Please sign in to comment.