One other thing to consider is using the built-in routes for admin functions so that you would have a users and an items controller (plus the associated models and views) and then within the controller you would have a couple of extra functions that were admin_add (user), admin_add (item).
In the Config/routes.php you can enable the routing in there so that you can access the admin items here: http://www.sample.com/admin/users/add or /admin/items/add
You can still have a /items/list in the same items controller that would not require authentication as an example.
Hope that helps. Really it is just scratching the surface, so let me know if you have any questions.
Rusty
On Sunday, May 27, 2012 2:21:32 PM UTC-7, Jacob Brunson wrote:
Hi. I'm new to CakePHP (just started yesterday)--After playing with it for a while, I just started working on the actual project i want to make using Cake.I want to make an Admin section of my site. In this admin section, there should be three pages:
- Add User (so an admin can create a new user)
- List Users (the admin can see all registered users)
- Add Item (the admin can add an 'item' to the database)
I am very unsure of what to name my Model, Controller, and Views. AdminsController, Admin, [add_user, list_users, add_item]? It just doesn't seem right.Could someone tell me definitively how I should be doing it, and if not, how you THINK I should be doing it?thanks,-Jacob
Our newest site for the community: CakePHP Video Tutorials http://tv.cakephp.org
Check out the new CakePHP Questions site http://ask.cakephp.org and help others with their CakePHP related questions.
To unsubscribe from this group, send email to
cake-php+unsubscribe@googlegroups.com For more options, visit this group at http://groups.google.com/group/cake-php
No comments:
Post a Comment