mirror of
https://github.com/bs-community/blessing-skin-server.git
synced 2024-12-21 06:19:38 +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) {
|
||||
// Provide some application information for javascript
|
||||
$blessing = array_merge(Arr::except(config('app'), ['key', 'providers', 'aliases', 'cipher', 'log', 'url']), [
|
||||
$blessing = [
|
||||
'version' => config('app.version'),
|
||||
'locale' => config('app.locale'),
|
||||
'fallback_locale' => config('app.fallback_locale'),
|
||||
'base_url' => url('/'),
|
||||
'site_name' => option_localized('site_name'),
|
||||
'route' => request()->path(),
|
||||
'extra' => [],
|
||||
]);
|
||||
|
||||
];
|
||||
$event->addContent('<script>var blessing = '.json_encode($blessing).';</script>');
|
||||
});
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user