How do I capture urls like these: site.com/test-1-2-id-to-catch
OW::getRouter()->addRoute(new OW_Route('test.index', 'test-1-2:id', "TEST_CTRL_Test", 'index'));
How do I capture urls like these: site.com/test-1-2-id-to-catch
OW::getRouter()->addRoute(new OW_Route('test.index', 'test-1-2:id', "TEST_CTRL_Test", 'index'));
Hey,
you cant mixup url and Parameter.
Parameter have to be seperated by /
So it shpuld look like: test-1-2/:id
Or with more Parameters: test/:id1/:Name/:Nothing/normaletext
And then in the Controller:
public function index($params){
$params["id"]; //There is your id
}