Enabled HomeController additional methods
If the controller for a specified path doesn't exist, then it will search the HomeController.php for the method. If the method exists in HomeController, it fires it; if the method doesn't exist, it shows the error message.
http://localhost/index/home/index/index http://localhost/home/index/index/index No errors, but bad seo :paintbrush: Needs a little bit fix for unused parameters i think.
if (func_num_args() > 1)
return (new \Mini\Controller\ErrorController())->index();
else {
if (func_get_args() != null && func_get_args()[0] == "do") {
//doSomething
header("Location: ".URL);
} else
return (new \Mini\Controller\ErrorController())->index();
}
http://localhost/index/blabla returns error (404). http://localhost/index/do redirects to http://localhost/ successfully. http://localhost/index/xx/xx (more than one parameters) gives error (404) I developed that but I believe there is a better way from my way. Thanks in advance...