Welcome Guest, Not a member yet? Register   Sign In
Routes from a Database field


I am thinking about to get routes by a database.

For example:

I want to create a database with a configuration table, where there will be two fields "blog_uri" and "shop_uri".

By default, I will use two controllers "Blog" and "Shop". Its load would be the uri "/blog" and "/shop".

But I wonder if there is a practical way to change the uri according to the fields defined in the database. Since the "blog_ri" field has the path "news", for example, and routing continues in the controller "Blog", but the address is "domain.tld/news".

Any "easy" solution?


Database-driven Routing in CodeIgniter
What did you Try? What did you Get? What did you Expect?

Joined CodeIgniter Community 2009.  ( Skype: insitfx )

(06-05-2016, 11:54 PM)InsiteFX Wrote: Database-driven Routing in CodeIgniter

Perfect. Thank you @InsiteFX.

Theme © iAndrew 2016 - Forum software by © MyBB