summaryrefslogtreecommitdiff
path: root/src/Helpers/Translation
diff options
context:
space:
mode:
Diffstat (limited to 'src/Helpers/Translation')
-rw-r--r--src/Helpers/Translation/TranslationServiceProvider.php6
1 files changed, 4 insertions, 2 deletions
diff --git a/src/Helpers/Translation/TranslationServiceProvider.php b/src/Helpers/Translation/TranslationServiceProvider.php
index 62247000..6df9b0fe 100644
--- a/src/Helpers/Translation/TranslationServiceProvider.php
+++ b/src/Helpers/Translation/TranslationServiceProvider.php
@@ -41,8 +41,10 @@ class TranslationServiceProvider extends ServiceProvider
'localeChangeCallback' => [$this, 'setLocale'],
]
);
- $this->app->instance(Translator::class, $translator);
- $this->app->instance('translator', $translator);
+ $this->app->singleton(Translator::class, function () use ($translator) {
+ return $translator;
+ });
+ $this->app->alias(Translator::class, 'translator');
}
/**