Welcome Guest, Not a member yet? Register   Sign In
Please Help with routing
#1

Hello all,  I'm starting with CI4 (used CI3 for some projects) but this is my first time using routes and I want to know what do you recommend for this:

In my new project I want to have a website, its almost only static pages with some database calls (cities and product categories) and also will have a user area where they will be able to manage products.

According to docs should be like this:

/app       <-- Everything else in the app
/website  <-- All related to website
/public
/system
/tests
/writable


Website part should have only one controller and a view for any page (only 4 pages) and should work in root like this:
domain.com   (home page)
domain.com/services
domain.com/products
domain.com/contact

App part should have everything else and should work with 'app' (or whatever) prefix like:
domain.com/app/login
domain.com/app/users
domain.com/app/products
domain.com/app/cities
.
.

Is this ok?  Can anyone help me please with a routing example for achieving this?

Also should I use .env file for app settings or is it a better practice to create a dedicated config file for my app?
Reply


Messages In This Thread
Please Help with routing - by jnar - 11-03-2020, 02:46 PM
RE: Please Help with routing - by InsiteFX - 11-04-2020, 12:07 AM
RE: Please Help with routing - by jnar - 11-04-2020, 06:19 AM
RE: Please Help with routing - by jnar - 11-04-2020, 08:12 AM



Theme © iAndrew 2016 - Forum software by © MyBB