CakePHP models, unlike super models should be fat. It’s a good practice to keep redundant code out of your controllers. Here’s a quick example on
A nice little trick to check if you have some errors in the view is to use the $session object. Try this (in the view):
Update: as of 05/18/2008 there is a new core Containable behavior, which is an evolution of a few previous behaviors, including Bindable. If you are
CakePHP 1.2 provides a very easy way to send emails using the built-in Email component. However, sending emails directly from your User’s controller add action, for
In the past I’ve often kept some data such as a list of states or countries in the DB and used that to populate my
A little trick to make your paginator links look pretty… Add a ‘class’ option to your paginator links like so: [sourcecode language=’php’]
Just a little tip… In CakePHP 1.2 (at least the recent versions) Form and Html helpers are included by default. Therefore you can save yourself some
Looks like in the recent versions of CakePHP 1.2 the use of the vendor() method has been deprecated. Instead you are supposed to use App::import().