1
0
mirror of https://github.com/invoiceninja/invoiceninja.git synced 2024-11-10 13:12:50 +01:00

Change from singleton to binding

This commit is contained in:
David Bomba 2021-04-16 16:03:09 +10:00
parent 660dd976de
commit 18cf8110b5

View File

@ -33,7 +33,8 @@ class NinjaTranslationServiceProvider extends TranslationServiceProvider
*
*/
$this->app->singleton('translator', function ($app) {
$this->app->bind('translator', function($app) {
$loader = $app['translation.loader'];
$locale = $app['config']['app.locale'];
@ -42,6 +43,20 @@ class NinjaTranslationServiceProvider extends TranslationServiceProvider
$trans->setFallback($app['config']['app.fallback_locale']);
return $trans;
});
// $this->app->singleton('translator', function ($app) {
// $loader = $app['translation.loader'];
// $locale = $app['config']['app.locale'];
// $trans = new NinjaTranslator($loader, $locale);
// $trans->setFallback($app['config']['app.fallback_locale']);
// return $trans;
// });
}
}