use Illuminate\Support\ServiceProvider;
-class GtagServiceProvider extends ServiceProvider
+class GtagFrontProvider extends ServiceProvider
{
/**
* Perform post-registration booting of services.
*/
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(
*/
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'));