Slimming / structuring down admin controller

Hi,

I am creating an admin area for my site. Currently I will need to manage products, catrgories, orders and users. How would I structure the app, to use:

http://www.domain.com/admin/

Basically I don't want to have a really big admin controller so want the admin area to be strutured as:

Product section

List all: http://www.domain.com/admin/products

Edit / View: http://www.domain.com/admin/products/1

Users section

List all: http://www.domain.com/admin/users

Edit / View: http://www.domain.com/admin/users/1

so each controller mangages their specific sections, and not just one big controller.

Thanks



30.7k

Hi,

yes you can use one controller for each model you have got. PhalconDevTools can help you to build (build model, controller and the associated views) these basic CRUD operations wich you will be able to customize to fit your needs.

To handle your controllers actions the way you want, phalcon's router is your friend, and for your problematic group of routes could be really usefull.