do not break when failed to load i18n
This commit is contained in:
parent
3fbf32ed14
commit
dbef3043eb
|
|
@ -2,6 +2,8 @@
|
||||||
|
|
||||||
namespace App\Listeners;
|
namespace App\Listeners;
|
||||||
|
|
||||||
|
use stdClass;
|
||||||
|
|
||||||
class SerializeGlobals
|
class SerializeGlobals
|
||||||
{
|
{
|
||||||
public function handle($event)
|
public function handle($event)
|
||||||
|
|
@ -13,6 +15,7 @@ class SerializeGlobals
|
||||||
'base_url' => url('/'),
|
'base_url' => url('/'),
|
||||||
'site_name' => option_localized('site_name'),
|
'site_name' => option_localized('site_name'),
|
||||||
'route' => request()->path(),
|
'route' => request()->path(),
|
||||||
|
'i18n' => new stdClass(),
|
||||||
'extra' => [],
|
'extra' => [],
|
||||||
];
|
];
|
||||||
$event->addContent('<script>const blessing = '.json_encode($blessing).';</script>');
|
$event->addContent('<script>const blessing = '.json_encode($blessing).';</script>');
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue
Block a user