Welcome Guest, Not a member yet? Register   Sign In
URI Routing Help - 23.07.19
#2

(This post was last modified: 07-23-2019, 03:06 AM by Digital_Wolf. Edit Reason: fixed smileys form ":s" to ": s" )

I'm not exactly sure what you want to do, but maybe it will help:

Example 1:
$route['{segment-1} / {segment-2} / {segment-3}']
will be converted to:
https://example.com/segment-1/segment-2/segment-3/

Example 2:
$route['auth/welcome/( : segment)'] = "authentication/index/$1";
The value "segment" can be passed to the method "index" of the class "authentication".
* Example: https://example.com/auth/welcome/Jack
  displays: Welcome, Jack !

Example 3:
$route['photos/( : segment)/( :any)'] = "photos/catalogs_$1/id_$2";
The value "#segment" can be passed to the "#catalogs_&1" method of the "#photo" class, after which this value becomes the " #catalogs_***" method, and the value from "#:any" is passed to the ready method "#catalogs_****".
* Example: https://example.com/photos/cats/1
  Displays photos whose ID=1, from catalogue under the name cats...

P.S. If somewhere is wrong please correct me, I may be confused with CI4.
Reply


Messages In This Thread
URI Routing Help - 23.07.19 - by Porto - 07-23-2019, 12:47 AM
RE: URI Routing Help - 23.07.19 - by Digital_Wolf - 07-23-2019, 03:03 AM
RE: URI Routing Help - 23.07.19 - by Porto - 07-23-2019, 05:44 AM
RE: URI Routing Help - 23.07.19 - by Digital_Wolf - 07-23-2019, 09:04 AM
RE: URI Routing Help - 23.07.19 - by Wouter60 - 07-23-2019, 06:16 AM
RE: URI Routing Help - 23.07.19 - by InsiteFX - 07-23-2019, 03:00 PM



Theme © iAndrew 2016 - Forum software by © MyBB