Teraz potrzebuje dodać lang. Reguła wygląda porawnie.
->filter(function($route, $params, $request) { $router = new Model_Router(); return $router->find_by_key($params); }) 'lang' => 'pl', 'directory' => 'Frontend', 'controller' => 'Index', ));
Jeżeli w adresie będzie to zwraca parametry porawnie: http://localhost/elektryka/en/about-us/another-slug
( [lang] => en [slug] => asas [slubslug] => asa [directory] => Frontend [controller] => Index )
Nie działa, gdy w adresie nie ma drugiego parametru: http://localhost/elektryka/en/about-us
( [lang] => pl [directory] => Frontend [controller] => Index )