• 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
codeigniter4 controller name style like UserGroup

#2
(11-08-2018, 05:47 AM)obozdag Wrote: I name my controller UserGroup according to codeigniter4 coding style as it says:

Class names and namespaces SHOULD be declared in UpperCamelCase, also called StudlyCaps, unless another form is functionally required.

But when I try my controller on browser as http://localhost/usergroup it gives 404 - File Not Found error.
http://localhost/userGroup works. http://localhost/UserGroup works too. But http://localhost/usergroup doesn't.

Should I change my controller name to Usergroup or url to http://localhost/UserGroup (or http://localhost/userGroup)?
you can add routes.
$routes->add('usergroup','userGroup::index')
Reply


Messages In This Thread
RE: codeigniter4 controller name style like UserGroup - by titounnes - 11-08-2018, 07:47 AM

Digg   Delicious   Reddit   Facebook   Twitter   StumbleUpon  


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