Вопрос

I want to route something like this: http://myapp.com/mycontroller/...?x=...

where everything after mycontroller is unknown. I dont know the path and i dont know any of the parameters. After routing the path and parameters should appear as one variable.

// route in routes.php
Router::connect('/mycontroller/*', 'Mycontroller::index');

// the index function of Mycontroller class
public function index($pathWithParameters) {
    print_r($pathWithParameters); // something like: 'hello/world?name=mewel&id=123
}

Is this possible?

Нет правильного решения

Лицензировано под: CC-BY-SA с атрибуция
Не связан с StackOverflow
scroll top