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