• 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Sub Directory on Controller

#12
(09-24-2019, 08:34 AM)MGatner Wrote: @andybiancoblu Are you getting an error message? E.g. 404 Not Found.

I don't *think* it would matter but you should try uppercase on your namespace: `App\Controllers\Dashboard`

Also make sure auto-routing is enabled (should be if you didn't change anything) in **app/Config/Routes.php**

Hi @MGatner,
yeah, I'm getting 404 error.
The only way to make it work was to add a route through $routes->add... Mapping subdir, controller and method, but I don't think that's the way of doing stuffs in CI4.
I'm running CI4 rc1 on a docker container, filesystem permissions are ok.
app/Config/Routes.php was modified only to set a default controller (which didn't work). To get it work i modified $routes->get('/', 'Class::method')

I'm trying right now to change to uppercase namespace. I did it like that cause I saw the guy who started the post that didn't use uppercase for namespacing the subdir.

Thanks a lot for the reply, I'm going to update you soon.

Andy
[Image: https://vulndetect.org/assets/uploads/fi...docker.ico]

Andy Biancoblu 

Quote:Once you have eliminated the impossible, whatever remains, however improbable, must be the truth.
Reply


Messages In This Thread
Sub Directory on Controller - by finhawkman - 04-05-2019, 09:06 PM
RE: Sub Directory on Controller - by finhawkman - 04-06-2019, 12:15 AM
RE: Sub Directory on Controller - by pkMyt1 - 04-10-2019, 09:26 AM
RE: Sub Directory on Controller - by michael.j - 05-02-2019, 01:44 AM
RE: Sub Directory on Controller - by finhawkman - 05-02-2019, 06:49 AM
RE: Sub Directory on Controller - by michael.j - 05-03-2019, 01:14 AM
RE: Sub Directory on Controller - by InsiteFX - 05-03-2019, 03:20 AM
RE: Sub Directory on Controller - by finhawkman - 05-03-2019, 11:47 PM
RE: Sub Directory on Controller - by InsiteFX - 05-04-2019, 04:37 AM
RE: Sub Directory on Controller - by MGatner - 09-24-2019, 08:34 AM
RE: Sub Directory on Controller - by andybiancoblu - 09-24-2019, 09:29 AM
RE: Sub Directory on Controller - by InsiteFX - 09-25-2019, 02:47 AM

Digg   Delicious   Reddit   Facebook   Twitter   StumbleUpon  


  Theme ¬© 2014 iAndrew  
Powered By MyBB, © 2002-2020 MyBB Group.