]> _ Git - cubist_gtag.git/commitdiff
wip #3753
authorVincent Vanwaelscappel <vincent@cubedesigners.com>
Thu, 3 Dec 2020 13:22:07 +0000 (14:22 +0100)
committerVincent Vanwaelscappel <vincent@cubedesigners.com>
Thu, 3 Dec 2020 13:22:07 +0000 (14:22 +0100)
src/GtagFrontProvider.php

index dceb346e0eb7e8c8421dbed96402f886a540c52d..76c0271bb86117d148d057673d48adc7c2906827 100644 (file)
@@ -5,7 +5,7 @@ namespace Cubist\Gtag;
 use Illuminate\Support\ServiceProvider;
 
 
-class GtagServiceProvider extends ServiceProvider
+class GtagFrontProvider extends ServiceProvider
 {
     /**
      * Perform post-registration booting of services.
@@ -14,14 +14,16 @@ class GtagServiceProvider extends ServiceProvider
      */
     public function boot()
     {
-        $this->loadViewsFrom(__DIR__ . '/../resources/views', 'gtag');
+        $resourcesDir= dirname(__DIR__) . '/resources';
+
+        $this->loadViewsFrom($resourcesDir . '/views', 'gtag');
 
         $this->publishes([
-            __DIR__ . '/../resources/config/config.php' => config_path('gtag.php'),
+            $resourcesDir . '/config/config.php' => config_path('gtag.php'),
         ], 'config');
 
         $this->publishes([
-            __DIR__ . '/../resources/views' => base_path('resources/views/vendor/cubist/gtag'),
+            $resourcesDir . '/views' => base_path('resources/views/vendor/cubist/gtag'),
         ], 'views');
 
         $this->app['view']->creator(
@@ -35,7 +37,9 @@ class GtagServiceProvider extends ServiceProvider
      */
     public function register()
     {
-        $this->mergeConfigFrom(__DIR__ . '/../resources/config/config.php', 'gtag');
+        $resourcesDir= dirname(__DIR__) . '/resources';
+
+        $this->mergeConfigFrom($resourcesDir . '/config/config.php', 'gtag');
 
         $googleAnalytics = new GoogleAnalytics(config('gtag.id'));