]> _ Git - cubist_gtag.git/commitdiff
wip #3753
authorVincent Vanwaelscappel <vincent@cubedesigners.com>
Thu, 3 Dec 2020 13:24:27 +0000 (14:24 +0100)
committerVincent Vanwaelscappel <vincent@cubedesigners.com>
Thu, 3 Dec 2020 13:24:27 +0000 (14:24 +0100)
src/GtagFrontProvider.php [deleted file]
src/GtagServiceProvider.php [new file with mode: 0644]

diff --git a/src/GtagFrontProvider.php b/src/GtagFrontProvider.php
deleted file mode 100644 (file)
index 76c0271..0000000
+++ /dev/null
@@ -1,54 +0,0 @@
-<?php
-
-namespace Cubist\Gtag;
-
-use Illuminate\Support\ServiceProvider;
-
-
-class GtagFrontProvider extends ServiceProvider
-{
-    /**
-     * Perform post-registration booting of services.
-     *
-     * @return void
-     */
-    public function boot()
-    {
-        $resourcesDir= dirname(__DIR__) . '/resources';
-
-        $this->loadViewsFrom($resourcesDir . '/views', 'gtag');
-
-        $this->publishes([
-            $resourcesDir . '/config/config.php' => config_path('gtag.php'),
-        ], 'config');
-
-        $this->publishes([
-            $resourcesDir . '/views' => base_path('resources/views/vendor/cubist/gtag'),
-        ], 'views');
-
-        $this->app['view']->creator(
-            ['gtag::body', 'gtag::head', 'gtag::script'],
-            'Cubist\Gtag\ScriptViewCreator'
-        );
-    }
-
-    /**
-     * Register the application services.
-     */
-    public function register()
-    {
-        $resourcesDir= dirname(__DIR__) . '/resources';
-
-        $this->mergeConfigFrom($resourcesDir . '/config/config.php', 'gtag');
-
-        $googleAnalytics = new GoogleAnalytics(config('gtag.id'));
-
-        if (config('gtag.enabled') === false) {
-            $googleAnalytics->disable();
-        }
-        $googleAnalytics->setObserveDnt(config('gtag.observe_dnt'));
-
-        $this->app->instance('Cubist\Gtag\GoogleAnalytics', $googleAnalytics);
-        $this->app->alias('Cubist\Gtag\GoogleAnalytics', 'gtag');
-    }
-}
\ No newline at end of file
diff --git a/src/GtagServiceProvider.php b/src/GtagServiceProvider.php
new file mode 100644 (file)
index 0000000..13579a9
--- /dev/null
@@ -0,0 +1,54 @@
+<?php
+
+namespace Cubist\Gtag;
+
+use Illuminate\Support\ServiceProvider;
+
+
+class GtagServiceProvider extends ServiceProvider
+{
+    /**
+     * Perform post-registration booting of services.
+     *
+     * @return void
+     */
+    public function boot()
+    {
+        $resourcesDir= dirname(__DIR__) . '/resources';
+
+        $this->loadViewsFrom($resourcesDir . '/views', 'gtag');
+
+        $this->publishes([
+            $resourcesDir . '/config/config.php' => config_path('gtag.php'),
+        ], 'config');
+
+        $this->publishes([
+            $resourcesDir . '/views' => base_path('resources/views/vendor/cubist/gtag'),
+        ], 'views');
+
+        $this->app['view']->creator(
+            ['gtag::body', 'gtag::head', 'gtag::script'],
+            'Cubist\Gtag\ScriptViewCreator'
+        );
+    }
+
+    /**
+     * Register the application services.
+     */
+    public function register()
+    {
+        $resourcesDir= dirname(__DIR__) . '/resources';
+
+        $this->mergeConfigFrom($resourcesDir . '/config/config.php', 'gtag');
+
+        $googleAnalytics = new GoogleAnalytics(config('gtag.id'));
+
+        if (config('gtag.enabled') === false) {
+            $googleAnalytics->disable();
+        }
+        $googleAnalytics->setObserveDnt(config('gtag.observe_dnt'));
+
+        $this->app->instance('Cubist\Gtag\GoogleAnalytics', $googleAnalytics);
+        $this->app->alias('Cubist\Gtag\GoogleAnalytics', 'gtag');
+    }
+}
\ No newline at end of file