Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

how to pass the namespace path to a controller #363

Open
voocel opened this issue Apr 1, 2017 · 2 comments
Open

how to pass the namespace path to a controller #363

voocel opened this issue Apr 1, 2017 · 2 comments

Comments

@voocel
Copy link

voocel commented Apr 1, 2017

how to pass the namespace path to a controller and action
like this
Macaw::get('/home', 'HomeController@home');

@hozzaq
Copy link

hozzaq commented Oct 19, 2017

like this?
$klein->respond('GET', '/index', array('Hozzaq\Controller\IndexController', 'index'));

@njxqlus
Copy link

njxqlus commented Nov 15, 2017

You can use it like this (for non static methods):
$klein->get('/tests', [new \App\Controllers\TestController(), 'index']);

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants