| Conditions | 2 |
| Paths | 1 |
| Total Lines | 18 |
| Code Lines | 10 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 4 | ||
| Bugs | 0 | Features | 0 |
| 1 | <?php |
||
| 14 | public function register() |
||
| 15 | { |
||
| 16 | TranslatableConfig::cacheGetter(function ($table) { |
||
| 17 | return $this->app['cache']->get('translatable.'.$table); |
||
| 18 | }); |
||
| 19 | |||
| 20 | TranslatableConfig::cacheSetter(function ($table, $fields) { |
||
| 21 | return $this->app['cache']->forever('translatable.'.$table, $fields); |
||
| 22 | }); |
||
| 23 | |||
| 24 | TranslatableConfig::currentLocaleGetter(function () { |
||
| 25 | return $this->app->getLocale(); |
||
| 26 | }); |
||
| 27 | |||
| 28 | TranslatableConfig::fallbackLocaleGetter(function () { |
||
| 29 | return method_exists($this->app, 'getFallbackLocale') |
||
| 30 | ? $this->app->getFallbackLocale() |
||
| 31 | : config('app.fallback_locale'); |
||
|
|
|||
| 32 | }); |
||
| 56 |