codeigniter4 / CodeIgniter4

Open Source PHP Framework (originally from EllisLab)
https://codeigniter.com/
MIT License
5.38k stars 1.9k forks source link

Routes Not working #2301

Closed crustamet closed 5 years ago

crustamet commented 5 years ago

$routes->setDefaultNamespace('App\Controllers'); $routes->setDefaultController('Frontpanel'); $routes->setDefaultMethod('index'); $routes->setTranslateURIDashes(true); $routes->set404Override(); $routes->setAutoRoute(true);

and removed any routes setters

it goes to this line 557 in System Router

$this->controller = str_replace('/', '\', $this->collection->getDefaultNamespace() . $this->directory . $this->controllerName());

$this->controller equals to App\Controllers\\Frontpanel if i remove the DIRECTORY this will work. but i don`t know why the directory is put there.

So i let you guys decide wtf is going on.

Thanks

crustamet commented 5 years ago

Is this just me or this is not really working? please i am stuck at this problem. I want to test the default routes if working without any use of routes defined.

Please someone tell me something.

MGatner commented 5 years ago

Confirmed the error. I think I have a fix ready for testing.