@@ -40,10 +40,10 @@ discard block |
||
| 40 | 40 | public function boot() |
| 41 | 41 | { |
| 42 | 42 | $this->publishes([ |
| 43 | - __DIR__ . '/../config/translator.php' => config_path('translator.php'), |
|
| 44 | - __DIR__ . '/../config/translation.php' => config_path('translation.php'), |
|
| 43 | + __DIR__.'/../config/translator.php' => config_path('translator.php'), |
|
| 44 | + __DIR__.'/../config/translation.php' => config_path('translation.php'), |
|
| 45 | 45 | ]); |
| 46 | - $this->loadMigrationsFrom(__DIR__ . '/../database/migrations/'); |
|
| 46 | + $this->loadMigrationsFrom(__DIR__.'/../database/migrations/'); |
|
| 47 | 47 | |
| 48 | 48 | |
| 49 | 49 | $this->registerCacheRepository(); |
@@ -53,7 +53,7 @@ discard block |
||
| 53 | 53 | /** |
| 54 | 54 | * Provider Antigo |
| 55 | 55 | */ |
| 56 | - Blade::directive('t', function ($args) { |
|
| 56 | + Blade::directive('t', function($args) { |
|
| 57 | 57 | return "<?php echo App::make('translation')->translate{$args}; ?>"; |
| 58 | 58 | }); |
| 59 | 59 | } |
@@ -65,13 +65,13 @@ discard block |
||
| 65 | 65 | */ |
| 66 | 66 | public function register() |
| 67 | 67 | { |
| 68 | - $this->mergeConfigFrom(__DIR__ . '/../config/translator.php', 'translator'); |
|
| 69 | - $this->mergeConfigFrom(__DIR__ . '/../config/translation.php', 'translation'); |
|
| 68 | + $this->mergeConfigFrom(__DIR__.'/../config/translator.php', 'translator'); |
|
| 69 | + $this->mergeConfigFrom(__DIR__.'/../config/translation.php', 'translation'); |
|
| 70 | 70 | |
| 71 | 71 | parent::register(); |
| 72 | 72 | |
| 73 | 73 | // Bind translation to the IoC. |
| 74 | - $this->app->bind('translation', function (Application $app) { |
|
| 74 | + $this->app->bind('translation', function(Application $app) { |
|
| 75 | 75 | return new Translation($app); |
| 76 | 76 | }); |
| 77 | 77 | |
@@ -111,20 +111,20 @@ discard block |
||
| 111 | 111 | protected function registerLoader() |
| 112 | 112 | { |
| 113 | 113 | $app = $this->app; |
| 114 | - $this->app->singleton('translation.loader', function ($app) { |
|
| 114 | + $this->app->singleton('translation.loader', function($app) { |
|
| 115 | 115 | $defaultLocale = $app['config']->get('app.locale'); |
| 116 | 116 | $loader = null; |
| 117 | 117 | $source = $app['config']->get('translator.source'); |
| 118 | 118 | |
| 119 | 119 | switch ($source) { |
| 120 | 120 | case 'mixed': |
| 121 | - $laravelFileLoader = new LaravelFileLoader($app['files'], $app->basePath() . '/resources/lang'); |
|
| 121 | + $laravelFileLoader = new LaravelFileLoader($app['files'], $app->basePath().'/resources/lang'); |
|
| 122 | 122 | $fileLoader = new FileLoader($defaultLocale, $laravelFileLoader); |
| 123 | 123 | $databaseLoader = new DatabaseLoader($defaultLocale, $app->make(TranslationRepository::class)); |
| 124 | 124 | $loader = new MixedLoader($defaultLocale, $fileLoader, $databaseLoader); |
| 125 | 125 | break; |
| 126 | 126 | case 'mixed_db': |
| 127 | - $laravelFileLoader = new LaravelFileLoader($app['files'], $app->basePath() . '/resources/lang'); |
|
| 127 | + $laravelFileLoader = new LaravelFileLoader($app['files'], $app->basePath().'/resources/lang'); |
|
| 128 | 128 | $fileLoader = new FileLoader($defaultLocale, $laravelFileLoader); |
| 129 | 129 | $databaseLoader = new DatabaseLoader($defaultLocale, $app->make(TranslationRepository::class)); |
| 130 | 130 | $loader = new MixedLoader($defaultLocale, $databaseLoader, $fileLoader); |
@@ -133,7 +133,7 @@ discard block |
||
| 133 | 133 | $loader = new DatabaseLoader($defaultLocale, $app->make(TranslationRepository::class)); |
| 134 | 134 | break; |
| 135 | 135 | default:case 'files': |
| 136 | - $laravelFileLoader = new LaravelFileLoader($app['files'], $app->basePath() . '/resources/lang'); |
|
| 136 | + $laravelFileLoader = new LaravelFileLoader($app['files'], $app->basePath().'/resources/lang'); |
|
| 137 | 137 | $loader = new FileLoader($defaultLocale, $laravelFileLoader); |
| 138 | 138 | break; |
| 139 | 139 | } |
@@ -151,7 +151,7 @@ discard block |
||
| 151 | 151 | */ |
| 152 | 152 | public function registerCacheRepository() |
| 153 | 153 | { |
| 154 | - $this->app->singleton('translation.cache.repository', function ($app) { |
|
| 154 | + $this->app->singleton('translation.cache.repository', function($app) { |
|
| 155 | 155 | $cacheStore = $app['cache']->getStore(); |
| 156 | 156 | return CacheRepositoryFactory::make($cacheStore, $app['config']->get('translator.cache.suffix')); |
| 157 | 157 | }); |
@@ -168,7 +168,7 @@ discard block |
||
| 168 | 168 | $defaultLocale = $app['config']->get('app.locale'); |
| 169 | 169 | $languageRepository = $app->make(LanguageRepository::class); |
| 170 | 170 | $translationRepository = $app->make(TranslationRepository::class); |
| 171 | - $translationsPath = $app->basePath() . '/resources/lang'; |
|
| 171 | + $translationsPath = $app->basePath().'/resources/lang'; |
|
| 172 | 172 | $command = new FileLoaderCommand($languageRepository, $translationRepository, $app['files'], $translationsPath, $defaultLocale); |
| 173 | 173 | |
| 174 | 174 | $this->app['command.translator:load'] = $command; |