how to pass the namespace path to a controller
voocel opened this issue · 2 comments
voocel commented
how to pass the namespace path to a controller and action
like this
Macaw::get('/home', 'HomeController@home');
hozzaq commented
like this?
$klein->respond('GET', '/index', array('Hozzaq\Controller\IndexController', 'index'));
njxqlus commented
You can use it like this (for non static methods):
$klein->get('/tests', [new \App\Controllers\TestController(), 'index']);