CodeIgniter Forums
Help me with route, thanks - Printable Version

+- CodeIgniter Forums (https://forum.codeigniter.com)
+-- Forum: CodeIgniter 4 (https://forum.codeigniter.com/forumdisplay.php?fid=28)
+--- Forum: CodeIgniter 4 Support (https://forum.codeigniter.com/forumdisplay.php?fid=30)
+--- Thread: Help me with route, thanks (/showthread.php?tid=75423)



Help me with route, thanks - mjamilasfihani - 02-04-2020

I use my codeigniter rc3 as HMVC. Here is my structure

[Image: 73802195-755ce700-47ef-11ea-8a2a-cf88cd83dd12.png]

I try to do some action from HomeView with input username and password also method POST that handled by Home Controller to ActionSignIn. I set the route like this

PHP Code:
$routes->get('action-signin''Acme\Home\Controllers\HomeAction\ActionSignIn::index'); 

Peekaboo, it show 404 when I press the submit button. I try to visit

Code:
https://my.project-name.tld/action-signin

directly, nothing was wrong.


RE: Help me with route, thanks - mintwint - 02-05-2020

Acme\Home\Controllers\

It seems superfluous


RE: Help me with route, thanks - mjamilasfihani - 02-05-2020

(02-05-2020, 04:04 AM)mintwint Wrote: Acme\Home\Controllers\

It seems superfluous

I should using group? That's your point, right?


RE: Help me with route, thanks - mjamilasfihani - 02-05-2020

Its done, sorry I was missing something, maybe someone has same problem

https://codeigniter4.github.io/CodeIgniter4/incoming/routing.html#using-http-verbs-in-routes


RE: Help me with route, thanks - InsiteFX - 02-05-2020

I found the best way to understand the new routes is to view Lonnie's Myth/Auth.

Look at The routes file and the AuthController.

Myth:Auth


RE: Help me with route, thanks - mjamilasfihani - 02-05-2020

(02-05-2020, 09:18 AM)InsiteFX Wrote: I found the best way to understand the new routes is to view Lonnie's Myth/Auth.

Look at The routes file and the AuthController.

Myth:Auth

great, thanks