Hi Paul,
-- Welcome to the CakePHP community. From what I gather from your post you're looking for "basic" admin routing.
Please see http://book.cakephp.org/2.0/en/development/routing.html#prefix-routing
The "regular" way of creating admin-only functions in Cake is by prefixing your Views/Methods with "admin_" (can be anything you want, but this one is the most common).
When integrating Authentication/ACL, just make sure your Admins group is the only group that has access to the admin methods and you're good to go!
If you have any further questions after reading the documentation, feel free to ask.
Op donderdag 21 augustus 2014 01:11:26 UTC+2 schreef Paul Drage:
Op donderdag 21 augustus 2014 01:11:26 UTC+2 schreef Paul Drage:
Hi there!
I've a background from CodeIgniter and am trying out CakePHP.
So far I'm pretty impressed with how Cake can be scaled and how quick it is to get up and running - even on a strange remote DB setup things seem to be lightning fast.
I have created tables in a database, something like 27-28 tables with interlinking _id fields, I have run # cake bake models / controllers / views - and looked at the resulting framework in a web browser, all of the links seem to work and it's quick to add data - GREAT!
Now - Rather than creating 27-28 models and controllers and views manually cake has generated it all for me and put it into the relevant folders like /app/views
This is a bit hard to explain but I would of liked to of baked my CRUD stuff into a sub folder within each type, so for example:
app/controllers/ADMIN/___all_controllers baked
app/models/ADMIN/__
app/views/ADMIN/__
Then I would like to implement ACL/Auth rules to lock down all of the controllers that were baked into the admin folder/section based on something like admin_level (int) in db table.
This would then facilitate me in being able to use the root to build out the 'public' facing website which will sit on top of everything else - right now (i'm not sure if this is even possible?!) it's just a mess.. my views folder has probably 40-50 sub-folders with files in each - there isn't a nice folder structure, as soon as i come to add more controllers for the front-end public facing data and website i fear it will become unmanagable.
Please could you provide any assistance? I've looked at routing - I understand the concept, but I don't think that will solve the file management aspect here.
If I am unable to solve the file management side, i.e all files must be in subfolders within /views/ then perhaps you could suggest a way that I may be able to continue using the awesome function 'cake bake' to generate the CRUD views/models/controllers but with a view to me being able to specify that everything baked is to be 'ADMIN' functions - i have no problem hand coding the rest of the controllers and models for the public site - but the sheer amount of tables dictates that I'd be crazy to try and build every one of them by hand when cake bake is doing a great job for me already?
I've looked through the blog tutorial and so on but I've been unable to find any specific answers to my queries - I have been working with PHP since 2004 so have plenty of hands on experience but Cake might still be a little alien!
Thanks for any ideas or input you may have, it will be truly appreciated (right now the comfortable thing to do would be to go back to CodeIgniter which I'm trying my best to resist!)
Cheers
Paul
Like Us on FaceBook https://www.facebook.com/CakePHP
Find us on Twitter http://twitter.com/CakePHP
---
You received this message because you are subscribed to the Google Groups "CakePHP" group.
To unsubscribe from this group and stop receiving emails from it, send an email to cake-php+unsubscribe@googlegroups.com.
To post to this group, send email to cake-php@googlegroups.com.
Visit this group at http://groups.google.com/group/cake-php.
For more options, visit https://groups.google.com/d/optout.
No comments:
Post a Comment