Hi Nick,
-- Well every thing has a learning curve so be patient and you'll get the gist of it. I've used almost all PHP frameworks and by far Cake is the one that is easiest to learn and use.
To answer your question: No, you don't need a "mysql" assigned to the controller. By "mysql" I guess you mean Model. Cake will try to load a view with the same name of the method in the controller. So if your Controller named "ProductsController" is called and within it the method "index", then Cake will load a view with name "index.ctp" from app/Views/Products. In the view you can put whatever you want.
Because cake is trying to give you a solid ground for a quick start if you have a model named "Product" then Cake will try to load it also. And if you don't have a DB table assigned to that model then Cake will be unhappy. If you don't want that just use property $uses and set it to array().
On Tuesday, December 17, 2013 7:21:50 PM UTC+2, Nick Harper wrote:
On Tuesday, December 17, 2013 7:21:50 PM UTC+2, Nick Harper wrote:
Hi,
I have recently started to learn CakePHP after just being used to coding from scratch.
I have installed a couple of plugins but the issue I have is linking them together, for example if I have a login script then how on earth do I just show the login page for example?
Does every Controller need to have a mysql assigned to it?
I have been through the blog tutorial but so far it just feels really restrictive compared to just coding from scratch but what really appeals is the plugins / helpers but I am just struggling with basic things like echoing the username they are logged in with when logged in etc.
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/groups/opt_out.
No comments:
Post a Comment