Total Complexity | 3 |
Total Lines | 36 |
Duplicated Lines | 0 % |
Changes | 4 | ||
Bugs | 0 | Features | 0 |
1 | <?php |
||
10 | trait EnvironmentSetUp |
||
11 | { |
||
12 | protected $locales; |
||
13 | protected $addLocaleToUrl; |
||
14 | |||
15 | protected function getEnvironmentSetUp($app) |
||
16 | { |
||
17 | $this->locales = ['fr', 'en']; |
||
18 | $this->addLocaleToUrl = true; |
||
19 | |||
20 | $app['config']->set('localeroute.locales', $this->locales); |
||
21 | $app['config']->set('localeroute.add_locale_to_url', $this->addLocaleToUrl); |
||
22 | |||
23 | $app['locale-route'] = app()->make(LocaleRouter::class); |
||
24 | $app['locale-route-url'] = app()->make(PrefixRoute::class); |
||
25 | |||
26 | $app['router']->aliasMiddleware('locale.session', SetSessionLocale::class); |
||
27 | } |
||
28 | |||
29 | public function getRouteInfo() |
||
41 | } |
||
42 | |||
43 | public function ddRouteInfo() |
||
46 | } |
||
47 | } |
||
48 |