mirror of
https://github.com/bs-community/blessing-skin-server.git
synced 2024-12-27 06:29:19 +08:00
Remove unused JavaScript global variables
This commit is contained in:
parent
e2c125648f
commit
6918a46ae8
@ -29,14 +29,15 @@ class AppServiceProvider extends ServiceProvider
|
|||||||
});
|
});
|
||||||
|
|
||||||
Event::listen(Events\RenderingHeader::class, function ($event) {
|
Event::listen(Events\RenderingHeader::class, function ($event) {
|
||||||
// Provide some application information for javascript
|
$blessing = [
|
||||||
$blessing = array_merge(Arr::except(config('app'), ['key', 'providers', 'aliases', 'cipher', 'log', 'url']), [
|
'version' => config('app.version'),
|
||||||
|
'locale' => config('app.locale'),
|
||||||
|
'fallback_locale' => config('app.fallback_locale'),
|
||||||
'base_url' => url('/'),
|
'base_url' => url('/'),
|
||||||
'site_name' => option_localized('site_name'),
|
'site_name' => option_localized('site_name'),
|
||||||
'route' => request()->path(),
|
'route' => request()->path(),
|
||||||
'extra' => [],
|
'extra' => [],
|
||||||
]);
|
];
|
||||||
|
|
||||||
$event->addContent('<script>var blessing = '.json_encode($blessing).';</script>');
|
$event->addContent('<script>var blessing = '.json_encode($blessing).';</script>');
|
||||||
});
|
});
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user