Welcome Guest, Not a member yet? Register   Sign In
Routes: Which style is "better"?
#5

It is better not to use (:any) unless you need to catch multiple URI segments.
https://codeigniter4.github.io/CodeIgnit...ior-of-any

Generally it is better to register each route.
This is because it allows us to understand the specific routes.
You can use the php spark routes command to list all routes.

The match() method is generally not good.
If a single controller method performs the processing of multiple HTTP method requests,
the method becomes more complex.
Reply


Messages In This Thread
Routes: Which style is "better"? - by SoccerGuy3 - 12-27-2023, 11:55 AM
RE: Routes: Which style is "better"? - by demyr - 12-28-2023, 01:47 AM
RE: Routes: Which style is "better"? - by kenjis - 12-28-2023, 05:17 PM
RE: Routes: Which style is "better"? - by demyr - 12-29-2023, 02:43 AM
RE: Routes: Which style is "better"? - by lazcorp - 12-29-2023, 05:18 AM



Theme © iAndrew 2016 - Forum software by © MyBB