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:
parent
660dd976de
commit
18cf8110b5
@ -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;
|
||||
|
||||
// });
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user