@@ -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 | /** |
@@ -53,8 +53,8 @@ discard block |
||
53 | 53 | */ |
54 | 54 | public function register() |
55 | 55 | { |
56 | - $this->mergeConfigFrom(__DIR__ . '/../config/translator.php', 'translator'); |
|
57 | - $this->mergeConfigFrom(__DIR__ . '/../config/translation.php', 'translation'); |
|
56 | + $this->mergeConfigFrom(__DIR__.'/../config/translator.php', 'translator'); |
|
57 | + $this->mergeConfigFrom(__DIR__.'/../config/translation.php', 'translation'); |
|
58 | 58 | |
59 | 59 | $this->registerPresenceVerifier(); |
60 | 60 | |
@@ -78,7 +78,7 @@ discard block |
||
78 | 78 | parent::register(); |
79 | 79 | |
80 | 80 | // Bind translation to the IoC. |
81 | - $this->app->bind('translation', function (Application $app) { |
|
81 | + $this->app->bind('translation', function(Application $app) { |
|
82 | 82 | return new Translation($app); |
83 | 83 | }); |
84 | 84 | |
@@ -88,7 +88,7 @@ discard block |
||
88 | 88 | /** |
89 | 89 | * Provider Antigo |
90 | 90 | */ |
91 | - Blade::directive('t', function ($args) { |
|
91 | + Blade::directive('t', function($args) { |
|
92 | 92 | return "<?php echo App::make('translation')->translate{$args}; ?>"; |
93 | 93 | }); |
94 | 94 | |
@@ -128,20 +128,20 @@ discard block |
||
128 | 128 | protected function registerLoader() |
129 | 129 | { |
130 | 130 | $app = $this->app; |
131 | - $this->app->singleton('translation.loader', function ($app) { |
|
131 | + $this->app->singleton('translation.loader', function($app) { |
|
132 | 132 | $defaultLocale = $app['config']->get('app.locale'); |
133 | 133 | $loader = null; |
134 | 134 | $source = $app['config']->get('translator.source'); |
135 | 135 | |
136 | 136 | switch ($source) { |
137 | 137 | case 'mixed': |
138 | - $laravelFileLoader = new LaravelFileLoader($app['files'], $app->basePath() . '/resources/lang'); |
|
138 | + $laravelFileLoader = new LaravelFileLoader($app['files'], $app->basePath().'/resources/lang'); |
|
139 | 139 | $fileLoader = new FileLoader($defaultLocale, $laravelFileLoader); |
140 | 140 | $databaseLoader = new DatabaseLoader($defaultLocale, $app->make(TranslationRepository::class)); |
141 | 141 | $loader = new MixedLoader($defaultLocale, $fileLoader, $databaseLoader); |
142 | 142 | break; |
143 | 143 | case 'mixed_db': |
144 | - $laravelFileLoader = new LaravelFileLoader($app['files'], $app->basePath() . '/resources/lang'); |
|
144 | + $laravelFileLoader = new LaravelFileLoader($app['files'], $app->basePath().'/resources/lang'); |
|
145 | 145 | $fileLoader = new FileLoader($defaultLocale, $laravelFileLoader); |
146 | 146 | $databaseLoader = new DatabaseLoader($defaultLocale, $app->make(TranslationRepository::class)); |
147 | 147 | $loader = new MixedLoader($defaultLocale, $databaseLoader, $fileLoader); |
@@ -150,7 +150,7 @@ discard block |
||
150 | 150 | $loader = new DatabaseLoader($defaultLocale, $app->make(TranslationRepository::class)); |
151 | 151 | break; |
152 | 152 | default:case 'files': |
153 | - $laravelFileLoader = new LaravelFileLoader($app['files'], $app->basePath() . '/resources/lang'); |
|
153 | + $laravelFileLoader = new LaravelFileLoader($app['files'], $app->basePath().'/resources/lang'); |
|
154 | 154 | $loader = new FileLoader($defaultLocale, $laravelFileLoader); |
155 | 155 | break; |
156 | 156 | } |
@@ -168,7 +168,7 @@ discard block |
||
168 | 168 | */ |
169 | 169 | public function registerCacheRepository() |
170 | 170 | { |
171 | - $this->app->singleton('translation.cache.repository', function ($app) { |
|
171 | + $this->app->singleton('translation.cache.repository', function($app) { |
|
172 | 172 | $cacheStore = $app['cache']->getStore(); |
173 | 173 | return CacheRepositoryFactory::make($cacheStore, $app['config']->get('translator.cache.suffix')); |
174 | 174 | }); |
@@ -185,7 +185,7 @@ discard block |
||
185 | 185 | $defaultLocale = $app['config']->get('app.locale'); |
186 | 186 | $languageRepository = $app->make(LanguageRepository::class); |
187 | 187 | $translationRepository = $app->make(TranslationRepository::class); |
188 | - $translationsPath = $app->basePath() . '/resources/lang'; |
|
188 | + $translationsPath = $app->basePath().'/resources/lang'; |
|
189 | 189 | $command = new FileLoaderCommand($languageRepository, $translationRepository, $app['files'], $translationsPath, $defaultLocale); |
190 | 190 | |
191 | 191 | $this->app['command.translator:load'] = $command; |
@@ -20,8 +20,7 @@ |
||
20 | 20 | // THIS WILL NOW RETURN YOUR NEW SERVICE PROVIDER SINCE YOU'RE |
21 | 21 | // IN THE MyLib\Validation NAMESPACE |
22 | 22 | return new Validator($this->translator, $data, $rules, $messages); |
23 | - } |
|
24 | - else |
|
23 | + } else |
|
25 | 24 | { |
26 | 25 | return call_user_func($this->resolver, $this->translator, $data, $rules, $messages); |
27 | 26 | } |