Skip to content

Commit

Permalink
service name 변경
Browse files Browse the repository at this point in the history
  • Loading branch information
jhyeon1010 committed Aug 16, 2017
1 parent e48ac3e commit 9cd7e60
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 8 deletions.
11 changes: 4 additions & 7 deletions plugin.php
Original file line number Diff line number Diff line change
Expand Up @@ -33,16 +33,13 @@ public function boot()

public function register()
{
app()->bind('xe.plugin.ga', function () {
return $this;
}, true);

app()->singleton('xe.plugin.ga.handler', function ($app) {
app()->singleton(Handler::class, function ($app) {
return new Handler(
$app,
new Setting($app['xe.config'], $app['xe.storage'], $app['xe.keygen'])
);
}, true);
app()->alias(Handler::class, 'xe.ga');

$this->routes();
$this->intercepts();
Expand Down Expand Up @@ -71,7 +68,7 @@ private function intercepts()
/** @var \Illuminate\Routing\Route $route */
$route = app('router')->current();
if (in_array('settings', $route->middleware()) === false) {
$setting = app('xe.plugin.ga.handler')->getSetting();
$setting = app('xe.ga')->getSetting();
if ($setting->get('trackingId')) {
XeFrontend::html('ga:tracking')->content(
$this->getTrackingCode($setting->get('trackingId'), $setting->get('domain', 'auto'))
Expand All @@ -90,6 +87,6 @@ private function getTrackingCode($trackingId, $domain = 'auto')

public function uninstall()
{
app('xe.plugin.ga.handler')->getSetting()->destroy();
app('xe.ga')->getSetting()->destroy();
}
}
2 changes: 1 addition & 1 deletion views/setting.blade.php
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
{{ XeFrontend::css(app('xe.plugin.ga')->asset('assets/skin.css'))->load() }}
{{ XeFrontend::css('plugins/google_analytics/assets/skin.css')->load() }}
{{ XeFrontend::translation(['validation.mimes']) }}

@section('page_title')
Expand Down

0 comments on commit 9cd7e60

Please sign in to comment.