File tree Expand file tree Collapse file tree 1 file changed +3
-8
lines changed
Expand file tree Collapse file tree 1 file changed +3
-8
lines changed Original file line number Diff line number Diff line change @@ -42,18 +42,13 @@ public function map(Router $router)
4242 /**
4343 * Front office routes
4444 */
45- $ routes = app ('TypiCMS.routes ' );
45+ $ routes = $ this -> app -> make ('TypiCMS.routes ' );
4646 foreach (Config::get ('translatable.locales ' ) as $ lang ) {
4747 if (isset ($ routes ['places ' ][$ lang ])) {
4848 $ uri = $ routes ['places ' ][$ lang ];
49- } else {
50- $ uri = 'places ' ;
51- if (Config::get ('app.fallback_locale ' ) != $ lang || config ('typicms.main_locale_in_url ' )) {
52- $ uri = $ lang . '/ ' . $ uri ;
53- }
49+ $ router ->get ($ uri , array ('as ' => $ lang .'.places ' , 'uses ' => 'PublicController@index ' ));
50+ $ router ->get ($ uri .'/{slug} ' , array ('as ' => $ lang .'.places.slug ' , 'uses ' => 'PublicController@show ' ));
5451 }
55- $ router ->get ($ uri , array ('as ' => $ lang .'.places ' , 'uses ' => 'PublicController@index ' ));
56- $ router ->get ($ uri .'/{slug} ' , array ('as ' => $ lang .'.places.slug ' , 'uses ' => 'PublicController@show ' ));
5752 }
5853
5954 /**
You can’t perform that action at this time.
0 commit comments