CodeIgniter Forums
Confirmation required - Printable Version

+- CodeIgniter Forums (https://forum.codeigniter.com)
+-- Forum: CodeIgniter 4 (https://forum.codeigniter.com/forum-28.html)
+--- Forum: CodeIgniter 4 Discussion (https://forum.codeigniter.com/forum-31.html)
+--- Thread: Confirmation required (/thread-74016.html)



Confirmation required - paulkd - 07-08-2019

Hi,

Can someone confirm that it is not possible to have the following controller file App/Controllers/Front/Main.php and have the following route

Code:
$routes->add('/about', 'front/main::about');



RE: Confirmation required - InsiteFX - 07-09-2019

take the forward slash off of /about


RE: Confirmation required - paulkd - 07-10-2019

(07-08-2019, 10:20 AM)paulkd Wrote: Hi,

Can someone confirm that it is not possible to have the following controller file App/Controllers/Front/Main.php and have the following route

Code:
$routes->add('/about', 'front/main::about');

Perfect!  user error  Rolleyes

Thanks very much.  Big Grin

The documentation was confusing me a little
Quote:When using this feature the first segment of your URI must specify the folder.

https://codeigniter4.github.io/userguide/incoming/controllers.html#organizing-your-controllers-into-sub-directories